summaryrefslogtreecommitdiffstats
path: root/libvncclient/tls.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncclient/tls.c')
-rw-r--r--libvncclient/tls.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libvncclient/tls.c b/libvncclient/tls.c
index 206dbda..eb89413 100644
--- a/libvncclient/tls.c
+++ b/libvncclient/tls.c
@@ -62,6 +62,9 @@ PushTLS(gnutls_transport_ptr_t transport, const void *data, size_t len)
ret = write(client->sock, data, len);
if (ret < 0)
{
+#ifdef WIN32
+ errno=WSAGetLastError();
+#endif
if (errno == EINTR) continue;
return -1;
}
@@ -81,6 +84,9 @@ PullTLS(gnutls_transport_ptr_t transport, void *data, size_t len)
ret = read(client->sock, data, len);
if (ret < 0)
{
+#ifdef WIN32
+ errno=WSAGetLastError();
+#endif
if (errno == EINTR) continue;
return -1;
}