Skip to content

Commit f32efd7

Browse files
Update Lib/asyncio/base_events.py
Co-authored-by: Kumar Aditya <[email protected]>
1 parent 7f3481b commit f32efd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/asyncio/base_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def _attach(self, transport):
318318

319319
def _detach(self, transport):
320320
self._clients.discard(transport)
321-
if self._state == _ServerState.CLOSED and len(self._clients) == 0:
321+
if self._state == _ServerState.CLOSED and not self._clients:
322322
self._shutdown()
323323

324324
def _shutdown(self):

0 commit comments

Comments
 (0)