The socket might not be the stream actually used, e.g. when we are using
TLS. Make sure we cork the proper stream to get all the benefits of
corking.
// We might have been called to flush unwritten socket data
cc->sock->outStream().flush();
- cc->sock->outStream().cork(true);
+ cc->getOutStream()->cork(true);
// processMsg() only processes one message, so we need to loop
// until the buffers are empty or things will stall.
break;
}
- cc->sock->outStream().cork(false);
+ cc->getOutStream()->cork(false);
} catch (rdr::EndOfStream& e) {
vlog.info("%s", e.str());
if (!cc->desktop) {