Fix problem with cs_close hang/wait in SSL mode YAZ-652
[yaz-moved-to-github.git] / src / tcpip.c
index 41c0725..dcfec86 100644 (file)
@@ -388,6 +388,7 @@ struct addrinfo *tcpip_getaddrinfo(const char *str, const char *port,
     else
     {
         error = getaddrinfo(host, port, &hints, &res);
+        *ipv6_only = -1;
     }
     if (error)
         return 0;
@@ -1365,7 +1366,7 @@ void tcpip_close(COMSTACK h)
     {
 #if HAVE_GNUTLS_H
         if (sp->session)
-            gnutls_bye(sp->session, GNUTLS_SHUT_RDWR);
+            gnutls_bye(sp->session, GNUTLS_SHUT_WR);
 #elif HAVE_OPENSSL_SSL_H
         if (sp->ssl)
         {