Skip to content

Commit fdcdb4f

Browse files
gh-84532: Close the accepted connections in test_reconnect
The test left the server-side connections unclosed, which regrtest reported as an altered environment (ResourceWarning: unclosed socket). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a222437 commit fdcdb4f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/test/test_logging.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,7 @@ def test_reconnect(self):
19531953

19541954
def recv_message():
19551955
conn, _ = server.accept()
1956+
self.addCleanup(conn.close)
19561957
chunk = conn.recv(4)
19571958
slen = struct.unpack(">L", chunk)[0]
19581959
chunk = b''

0 commit comments

Comments
 (0)