Check if ::sg::socks exists and close slave sockets only if there is one