aboutsummaryrefslogtreecommitdiffstats
path: root/mail/nullmailer/files/patch-lib_fdbuf_tlsobuf.cc
blob: 7e2e039af9278d9291a3ef17cd74e2d45b5796df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- lib/fdbuf/tlsobuf.cc.orig	2018-10-12 20:49:30 UTC
+++ lib/fdbuf/tlsobuf.cc
@@ -27,5 +27,10 @@ tlsobuf::tlsobuf(gnutls_session_t s, unsigned bufsz)
 
 ssize_t tlsobuf::_write(const char* buf, ssize_t len)
 {
-  return gnutls_record_send(session, buf, len);
+  ssize_t rc;
+  do
+  {
+    rc = gnutls_record_send(session, buf, len);
+  } while(rc == GNUTLS_E_AGAIN || rc == GNUTLS_E_INTERRUPTED);
+  return rc;
 }