disconnect and reconnect on sockets