From 1058e50c50f47635646c13d20b264d1579cf3de4 Mon Sep 17 00:00:00 2001 From: meejah Date: Thu, 8 Sep 2022 16:30:30 -0600 Subject: [PATCH] close properly --- src/allmydata/test/test_runner.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index c4bdee3fb..bce5b3c20 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -646,11 +646,12 @@ class OnStdinCloseTests(SyncTestCase): proto = on_stdin_close(reactor, onclose) self.assertEqual(called, []) - # one Unix we can just close all the readers, correctly + # on Unix we can just close all the readers, correctly # "simulating" a stdin close .. of course, Windows has to be # difficult if platform.isWindows(): - proto.loseConnection() + proto.writeConnectionLost() + proto.readConnectionLost() else: for reader in reactor.getReaders(): reader.loseConnection() @@ -672,7 +673,8 @@ class OnStdinCloseTests(SyncTestCase): self.assertEqual(called, []) if platform.isWindows(): - proto.loseConnection() + proto.writeConnectionLost() + proto.readConnectionLost() else: for reader in reactor.getReaders(): reader.loseConnection()