Fix infinite loop when calling close when auto_reconnect is enabled

For #16

Found it! When calling close it would attempt to reconnect since
`auto_reconnect` is set to true by default.