Fix double invokation of "disconnect()" when connection is refused.

Invoking "disconnect()" two times in a row triggers a new connection
attempt on the second call but this will end up in a connection loop.

We should also fix "disconnect()" to make it so that it doesn't try
to fetch a new socket resource when the connection is not actually
active, but we'll leave this to a different commit.

Thanks to @bixuehujin for reporting the issue (see #8).