// Store it internally
self._used_cons.add(conn)
hostmap = self._hostmap.setdefault(host, set())
hostmap.add(conn)
// logging
msg = "Added %s to pool, current %s pool size: %s"
debug(msg % (conn, host, conn_total + 1))
After Change
if conn_total < self.MAX_CONNECTIONS:
// Create a new connection
conn = conn_factory(req)
conn.current_request_start = time.time()
// Store it internally
self._used_conns.add(conn)