Closed matisszilard closed 6 years ago
What I've seen in practice is that libstrophe's users simply ignore SIGPIPE:
signal(SIGPIPE, SIG_IGN);
Also when a connection fails (instead of segfault) you can reconnect from the connection handler. But you need to understand that unsent messages will be lost and libstrophe doesn't provide a way to get the messages.
Thanks for the information.
Maybe it is a good idea to document somewhere that the SIGPIPE signal should be handled by the users of the library.
The libstrophe library crashed on iOS caused by a SIGPIPE signal.
Please see the following scenario:
Related logs:
Disabling SIGPIPE solves the issue:
Question:
How should the libstrophe library handle the SIGPIPE properly?
Connected blog:
https://badrit.com/blog/2010/11/30/ignore-sigpipe-signal-on-ios#.W5ZGTC2B0sl
Connected issues:
https://github.com/strophe/libstrophe/issues/113 https://github.com/strophe/libstrophe/issues/124