Fixed issue #473 "Cannot connect from the same client twice"

It wouldn't allow connecting from the same client twice even after the client was disconnected.
Now it checks if the previous socket is connected and if not, it will create a new connection.