fixed socket destroying if connected is -1

the connection is closed by a server during authorisation phase