]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/comm/ConnOpener.cc
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / comm / ConnOpener.cc
index 4925ebbd82ad59375dea56b2ac53226654a559f1..518547703bb376085652fb1a9aa442b5d1189f78 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -30,7 +30,7 @@ class CachePeer;
 
 CBDATA_NAMESPACED_CLASS_INIT(Comm, ConnOpener);
 
-Comm::ConnOpener::ConnOpener(Comm::ConnectionPointer &c, AsyncCall::Pointer &handler, time_t ctimeout) :
+Comm::ConnOpener::ConnOpener(const Comm::ConnectionPointer &c, const AsyncCall::Pointer &handler, time_t ctimeout) :
     AsyncJob("Comm::ConnOpener"),
     host_(NULL),
     temporaryFd_(-1),
@@ -39,7 +39,9 @@ Comm::ConnOpener::ConnOpener(Comm::ConnectionPointer &c, AsyncCall::Pointer &han
     totalTries_(0),
     failRetries_(0),
     deadline_(squid_curtime + static_cast<time_t>(ctimeout))
-{}
+{
+    debugs(5, 3, "will connect to " << c << " with " << ctimeout << " timeout");
+}
 
 Comm::ConnOpener::~ConnOpener()
 {
@@ -257,7 +259,7 @@ Comm::ConnOpener::createFd()
 {
     Must(temporaryFd_ < 0);
 
-    // our initators signal abort by cancelling their callbacks
+    // our initiators signal abort by cancelling their callbacks
     if (callback_ == NULL || callback_->canceled())
         return false;