Index: tlsIO.c
===================================================================
RCS file: /cvsroot/tls/tls/tlsIO.c,v
retrieving revision 1.17
diff -u -r1.17 tlsIO.c
--- tlsIO.c	8 Dec 2014 19:09:06 -0000	1.17
+++ tlsIO.c	10 Apr 2015 15:45:26 -0000
@@ -345,6 +345,11 @@
     if (!SSL_is_init_finished(statePtr->ssl)) {
 	bytesRead = Tls_WaitForConnect(statePtr, errorCodePtr);
 	if (bytesRead <= 0) {
+	    if (*errorCodePtr == ECONNRESET) {
+		/* Soft EOF */
+		*errorCodePtr = 0;
+		bytesRead = 0;
+	    }
 	    goto input;
 	}
     }
@@ -913,9 +918,6 @@
 		    continue;
 		}
 	    } else if (err == 0) {
-		if (Tcl_Eof(statePtr->self)) {
-		    return 0;
-		}
 		dprintf(stderr,"CR! ");
 		*errorCodePtr = ECONNRESET;
 		return -1;
