Skip to content

Commit

Permalink
♲ Populate request stats from connection directly
Browse files Browse the repository at this point in the history
Previously, the data was accessed through `self` which generated
unnecessarily long lines.
  • Loading branch information
webknjaz committed Mar 21, 2024
1 parent a72385c commit 9d496cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cheroot/workers/threadpool.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ def _process_connections_until_interrupted(self):
else:
conn.close()
if is_stats_enabled:
self.requests_seen += self.conn.requests_seen
self.bytes_read += self.conn.rfile.bytes_read
self.bytes_written += self.conn.wfile.bytes_written
self.requests_seen += conn.requests_seen
self.bytes_read += conn.rfile.bytes_read
self.bytes_written += conn.wfile.bytes_written
self.work_time += time.time() - self.start_time
self.start_time = None
self.conn = None
Expand Down

0 comments on commit 9d496cb

Please sign in to comment.