X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Ftcpip.c;h=c3a4b054bcdafc43f8399a41d2e04017cffd0cc6;hp=b9466d69379fb450eb45e2998924415aec6d3006;hb=ec603701ef51f85beef83898aa36e385028692f1;hpb=15aeea31b59ead99109571dcf67a5f3b78fd5585 diff --git a/src/tcpip.c b/src/tcpip.c index b9466d6..c3a4b05 100644 --- a/src/tcpip.c +++ b/src/tcpip.c @@ -1159,7 +1159,12 @@ int ssl_get(COMSTACK h, char **buf, int *bufsize) #if HAVE_GNUTLS_H res = gnutls_record_recv(sp->session, *buf + hasread, CS_TCPIP_BUFCHUNK); - if (res < 0) + if (res == 0) + { + TRC(fprintf(stderr, "gnutls_record_recv returned 0\n")); + return 0; + } + else if (res < 0) { if (ssl_check_error(h, sp, res)) break;