Close open sockets