Fixed a bug in shutting down the sock

pipes-network-safe don't do shutdown so we need to call that.