Diff

Differences From Artifact [3765b3df61]:

To Artifact [cd83a9c489]:


213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
213
214
215
216
217
218
219





220
221
222
223
224
225
226







-
-
-
-
-







	}

	dprintf("Calling Tls_WaitForConnect");
	tlsConnect = Tls_WaitForConnect(statePtr, errorCodePtr);
	if (tlsConnect < 0) {
		dprintf("Got an error waiting to connect (tlsConnect = %i, *errorCodePtr = %i)", tlsConnect, *errorCodePtr);

		if (statePtr->flags & TLS_TCL_HANDSHAKE_FAILED) {
			dprintf("The handshake completely failed, returning in failure");
			return(-1);
		}

		bytesRead = -1;
		if (*errorCodePtr == ECONNRESET) {
			dprintf("Got connection reset");
			/* Soft EOF */
			*errorCodePtr = 0;
			bytesRead = 0;
		}
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
337
338
339
340
341
342
343





344
345
346
347
348
349
350







-
-
-
-
-







	}

	dprintf("Calling Tls_WaitForConnect");
	tlsConnect = Tls_WaitForConnect(statePtr, errorCodePtr);
	if (tlsConnect < 0) {
		dprintf("Got an error waiting to connect (tlsConnect = %i, *errorCodePtr = %i)", tlsConnect, *errorCodePtr);

		if (statePtr->flags & TLS_TCL_HANDSHAKE_FAILED) {
			dprintf("The handshake completely failed, returning in failure");
			return(-1);
		}

		written = -1;
		if (*errorCodePtr == ECONNRESET) {
			dprintf("Got connection reset");
			/* Soft EOF */
			*errorCodePtr = 0;
			written = 0;
		}