--- a/libpurple/http.c Sun Sep 11 11:00:59 2016 -0500 +++ b/libpurple/http.c Mon Sep 12 07:58:26 2016 -0500 @@ -486,7 +486,11 @@ cb_data = g_object_steal_data(source, "cb_data"); if (conn == NULL) { - cb(hs, error->message, cb_data); + if (!g_error_matches(error, + G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + cb(hs, error->message, cb_data); + } + g_clear_error(&error); return; } @@ -1158,8 +1162,10 @@ &error); got_anything = (len > 0); - if (len < 0 && g_error_matches(error, - G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK)) { + if (len < 0 && (g_error_matches(error, + G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK) || + g_error_matches(error, + G_IO_ERROR, G_IO_ERROR_CANCELLED))) { g_clear_error(&error); return FALSE; } @@ -1444,8 +1450,10 @@ &error); } - if (written < 0 && g_error_matches(error, - G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK)) { + if (written < 0 && (g_error_matches(error, + G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK) || + g_error_matches(error, + G_IO_ERROR, G_IO_ERROR_CANCELLED))) { g_clear_error(&error); return G_SOURCE_CONTINUE; }