gracefully close open sockets in a http server