gnutls: deal with G_IO_ERROR_BROKEN_PIPE
authorDan Winship <danw@gnome.org>
Wed, 5 Dec 2012 20:02:07 +0000 (15:02 -0500)
committerDan Winship <danw@gnome.org>
Wed, 5 Dec 2012 20:02:07 +0000 (15:02 -0500)
glib 2.35 breaks G_IO_ERROR_BROKEN_PIPE out of G_IO_ERROR_FAILED, so
we need to recognize that now as well.

tls/gnutls/gtlsconnection-gnutls.c

index b1d4d52..ef53bb2 100644 (file)
@@ -694,6 +694,9 @@ end_gnutls_io (GTlsConnectionGnutls  *gnutls,
   if (gnutls->priv->handshaking && !gnutls->priv->ever_handshaked)
     {
       if (g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_FAILED) ||
+#if GLIB_CHECK_VERSION (2, 35, 3)
+         g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE) ||
+#endif
          status == GNUTLS_E_UNEXPECTED_PACKET_LENGTH ||
          status == GNUTLS_E_FATAL_ALERT_RECEIVED ||
          status == GNUTLS_E_DECRYPTION_FAILED ||