Diff

Differences From Artifact [cd83a9c489]:

To Artifact [3765b3df61]:


212
213
214
215
216
217
218





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







+
+
+
+
+







		return(0);
	}

	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;
336
337
338
339
340
341
342





343
344
345
346
347
348
349
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359







+
+
+
+
+







		return(-1);
	}

	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;