Skip to content

Instantly share code, notes, and snippets.

Created November 10, 2012 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4051586 to your computer and use it in GitHub Desktop.
Save anonymous/4051586 to your computer and use it in GitHub Desktop.
diff --git a/src/libwaitress/waitress.c b/src/libwaitress/waitress.c
index ce2a254..ea2dcbe 100644
--- a/src/libwaitress/waitress.c
+++ b/src/libwaitress/waitress.c
@@ -537,6 +537,10 @@ static WaitressReturn_t WaitressGnutlsRead (void *data, char *buf,
ssize_t ret = gnutls_record_recv (waith->request.tlsSession, buf, size);
if (ret < 0) {
+ if (ret == -9) {
+ *retSize = 0;
+ return waith->request.readWriteRet;
+ }
return WAITRESS_RET_TLS_READ_ERR;
} else {
*retSize = ret;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment