Delete the socket on close to prevent pings to dead sockets