code: def on_shutdown(self, broker):
          
          _v and LOG.debug('%r.on_shutdown()', self)
          if not IS_WSL:
              # #333: WSL generates invalid readiness indication on shutdown()
              self._wsock.shutdown(socket.SHUT_WR)
          self._wsock.close()
          self.transmit_side.close()
docs: Shut down the write end of the logging socket.