cleaning up sockets