Close unneeded sockets for local/remote delivery