Prevent trying to disconnect socket at the same moment we're trying to connect (fixes #6)