From: Alex Rousskov Date: Mon, 13 Sep 2010 01:48:17 +0000 (-0600) Subject: Do not send 1xx control msgs to closing connections, avoiding comm_write assert X-Git-Tag: take1~263 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eedd4182fd69fbfc501d1fb6a4f63a87b8185f26;p=thirdparty%2Fsquid.git Do not send 1xx control msgs to closing connections, avoiding comm_write assert --- diff --git a/src/client_side.cc b/src/client_side.cc index 09142c3f8b..e628863b8b 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -3810,14 +3810,14 @@ ConnStateData::In::~In() void ConnStateData::sendControlMsg(HttpControlMsg msg) { - ClientSocketContext::Pointer context = getCurrentContext(); - if (context != NULL) { - context->writeControlMsg(msg); // will call msg.cbSuccess + if (!isOpen()) { + debugs(33, 3, HERE << "ignoring 1xx due to earlier closure"); return; } - if (!isOpen()) { - debugs(33, 3, HERE << "ignoring 1xx due to earlier closure"); + ClientSocketContext::Pointer context = getCurrentContext(); + if (context != NULL) { + context->writeControlMsg(msg); // will call msg.cbSuccess return; }