]> granicus.if.org Git - neomutt/commit
Fix gnutls tls_socket_write() to properly retry
authorKevin McCarthy <kevin@8t8.us>
Mon, 21 Jan 2019 19:56:04 +0000 (11:56 -0800)
committerRichard Russon <rich@flatcap.org>
Wed, 20 Feb 2019 00:55:01 +0000 (00:55 +0000)
commitc2f86a20f8095d8b459c509cbd3b936c917fa4aa
treed607db1cbe0fd91f79b2b60d8bdf7df0d0f4a67c
parent0dce27f9815a84404e325e0858cb3feb94c6ea94
Fix gnutls tls_socket_write() to properly retry

Retry on GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED.  This prevents an
aborted send due to a SIGWINCH, for instance.

Change tls_socket_read() to follow the same flow.  Don't bother
checking gnutls_error_is_fatal() because return codes besides AGAIN
and INTERRUPTED end up closing the connection regardless.  (We don't
handle handshakes and negotations during send/receive).

Co-authored-by: Richard Russon <rich@flatcap.org>
conn/ssl_gnutls.c