Silence error message we get in gnutls when the peer hangs up

* gnutls.c (emacs_gnutls_read): Don't message anything if the peer
closes the connection while we're reading.

Fixes: debbugs:9182
This commit is contained in:
Lars Magne Ingebrigtsen 2011-07-27 22:45:56 +02:00
parent 427c285b57
commit dbf38e02c9
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
* gnutls.c (emacs_gnutls_read): Don't message anything if the peer
closes the connection while we're reading (bug#9182).
2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
* nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons

View file

@ -382,6 +382,9 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, EMACS_INT nbyte)
rtnval = fn_gnutls_record_recv (state, buf, nbyte);
if (rtnval >= 0)
return rtnval;
else if (rtnval == GNUTLS_E_UNEXPECTED_PACKET_LENGTH)
/* The peer closed the connection. */
return 0;
else if (emacs_gnutls_handle_error (state, rtnval) == 0)
/* non-fatal error */
return -1;