diff options
| author | Lars Magne Ingebrigtsen | 2011-07-27 22:45:56 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2011-07-27 22:45:56 +0200 |
| commit | dbf38e02c9ade4979418f24a99962cfef170b957 (patch) | |
| tree | 7415b0a94ed1a3998d900559f4a1f82caf4b750f /src/gnutls.c | |
| parent | 427c285b5782e1c1c581be01e085a77343bb2c79 (diff) | |
| download | emacs-dbf38e02c9ade4979418f24a99962cfef170b957.tar.gz emacs-dbf38e02c9ade4979418f24a99962cfef170b957.zip | |
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
Diffstat (limited to 'src/gnutls.c')
| -rw-r--r-- | src/gnutls.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gnutls.c b/src/gnutls.c index 3175f55041d..fc651d2c7e4 100644 --- a/src/gnutls.c +++ b/src/gnutls.c | |||
| @@ -382,6 +382,9 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, EMACS_INT nbyte) | |||
| 382 | rtnval = fn_gnutls_record_recv (state, buf, nbyte); | 382 | rtnval = fn_gnutls_record_recv (state, buf, nbyte); |
| 383 | if (rtnval >= 0) | 383 | if (rtnval >= 0) |
| 384 | return rtnval; | 384 | return rtnval; |
| 385 | else if (rtnval == GNUTLS_E_UNEXPECTED_PACKET_LENGTH) | ||
| 386 | /* The peer closed the connection. */ | ||
| 387 | return 0; | ||
| 385 | else if (emacs_gnutls_handle_error (state, rtnval) == 0) | 388 | else if (emacs_gnutls_handle_error (state, rtnval) == 0) |
| 386 | /* non-fatal error */ | 389 | /* non-fatal error */ |
| 387 | return -1; | 390 | return -1; |