Swallow write exception when the socket gets closed