This makes sure that it's sent to the client as soon as possible.
Also removed o_stream_nflush(), since uncorking does that already.
If there is no corking, the "+ OK" was already attempted to be sent
by the o_stream_nsend() call and a flush is unlikely to help.
if (parser->output != NULL && !parser->literal_nonsync) {
o_stream_nsend(parser->output, "+ OK\r\n", 6);
- o_stream_nflush(parser->output);
+ if (o_stream_is_corked(parser->output)) {
+ /* make sure this continuation is sent to the
+ client as soon as possible */
+ o_stream_uncork(parser->output);
+ o_stream_cork(parser->output);
+ }
}
}