From 6943d7e3977a53df83267c1bbe58f60b9867a2a6 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Fri, 3 Jun 2016 13:57:12 +1200 Subject: [PATCH] More explicit name for the tcp.Server handler counter --- netlib/tcp.py | 4 ++-- pathod/test.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/netlib/tcp.py b/netlib/tcp.py index 61209d64b..de12102ef 100644 --- a/netlib/tcp.py +++ b/netlib/tcp.py @@ -872,10 +872,10 @@ class TCPServer(object): self.socket.bind(self.address()) self.address = Address.wrap(self.socket.getsockname()) self.socket.listen(self.request_queue_size) - self.counter = Counter() + self.handler_counter = Counter() def connection_thread(self, connection, client_address): - with self.counter: + with self.handler_counter: client_address = Address(client_address) try: self.handle_client_connection(connection, client_address) diff --git a/pathod/test.py b/pathod/test.py index b10e92298..114627296 100644 --- a/pathod/test.py +++ b/pathod/test.py @@ -50,9 +50,9 @@ class Daemon: if time.time() - start >= timeout: raise TimeoutError( "%s service threads still alive" % - self.thread.server.counter.count + self.thread.server.handler_counter.count ) - if self.thread.server.counter.count == 0: + if self.thread.server.handler_counter.count == 0: return def expect_log(self, n, timeout=5):