--- a/libpurple/protocols/jabber/jabber.c Mon Nov 11 03:41:58 2019 +0000
+++ b/libpurple/protocols/jabber/jabber.c Tue Nov 12 02:40:44 2019 +0000
@@ -595,7 +595,7 @@
jabber_recv_cb(GObject *stream, gpointer data)
PurpleConnection *gc = data;
@@ -610,7 +610,7 @@
G_POLLABLE_INPUT_STREAM(stream), buf, sizeof(buf) - 1,
js->cancellable, &error);
purple_connection_update_last_received(gc);
if (js->sasl_maxbuf > 0) {
@@ -635,7 +635,7 @@
+ return G_SOURCE_CONTINUE; @@ -644,15 +644,17 @@
jabber_parser_process(js, buf, len);
- purple_connection_error(js->gc, PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
- _("Server closed the connection"));
- } else if (error->code != G_IO_ERROR_WOULD_BLOCK &&
- error->code != G_IO_ERROR_CANCELLED) {
+ len = g_pollable_input_stream_read_nonblocking( + G_POLLABLE_INPUT_STREAM(stream), buf, sizeof(buf) - 1, + js->cancellable, &error); + if (error->code != G_IO_ERROR_WOULD_BLOCK && + error->code != G_IO_ERROR_CANCELLED) { g_prefix_error(&error, "%s", _("Lost connection with server: "));
purple_connection_g_error(js->gc, error);
+ return G_SOURCE_CONTINUE;