Browse Source

pull_inner: All errors should return -2

(see https://github.com/civetweb/civetweb/issues/569#issuecomment-475730841)
bel2125 6 years ago
parent
commit
757c72d63a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/civetweb.c

+ 2 - 1
src/civetweb.c

@@ -6382,8 +6382,9 @@ pull_inner(FILE *fp,
 			           || (err == SSL_ERROR_WANT_WRITE)) {
 				nread = 0;
 			} else {
+				/* All errors should return -2 */
 				DEBUG_TRACE("SSL_read() failed, error %d", err);
-				return -1;
+				return -2;
 			}
 
 			ERR_clear_error();