workign on disconnecting sockets