]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not send 1xx control msgs to closing connections, avoiding comm_write assert
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 13 Sep 2010 01:48:17 +0000 (19:48 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 13 Sep 2010 01:48:17 +0000 (19:48 -0600)
src/client_side.cc

index 09142c3f8be6bd5a1018b9faeb12cd39ac622b97..e628863b8b7baa41f70c66c500a64d684a992e3d 100644 (file)
@@ -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;
     }