mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-09 03:44:23 +00:00
close properly
This commit is contained in:
parent
711f6d39e7
commit
1058e50c50
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user