Here is the error:

File "library.zip/xmpp/transports.py", line 183, in send self._send(raw_data) File "/usr/lib/python2.7/socket.py", line 224, in meth return getattr(self._sock,name)(*args) error: [Errno 32] Broken pipe

Question: how to treat it without losing the connection and sending raw_data

    1 answer 1

    If you get a broken pipe, then the connection is already broken. You have already lost it. Therefore, losing it will not work (humor). It is better to look for why the socket is broken (problems with communication, unstable server, write too much without checking return code from send, and so on).