File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -347,7 +347,17 @@ struct AsyncSocket {
347347 loopData->corkOffset = 0 ;
348348
349349 if (failed) {
350- /* We do not need to care for buffering here, write does that */
350+ /* If corked data fails to flush, and we have more data to write, immediately buffer it here
351+ * since the above call to write excludes src */
352+ if (!optionally && src && length) {
353+ AsyncSocketData<SSL> *asyncSocketData = getAsyncSocketData ();
354+ asyncSocketData->buffer .append (src, (size_t ) length);
355+
356+ /* We wrote to per socket buffer, so report success */
357+ return {length, true };
358+ }
359+
360+ /* We do not need to care for buffering (of the corked data) here, write did that */
351361 return {0 , true };
352362 }
353363 }
You can’t perform that action at this time.
0 commit comments