mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-27 14:30:19 +00:00
proto -> transport
This commit is contained in:
parent
3d43cbccc9
commit
36ed554627
@ -644,15 +644,15 @@ class OnStdinCloseTests(SyncTestCase):
|
|||||||
|
|
||||||
def onclose():
|
def onclose():
|
||||||
called.append(True)
|
called.append(True)
|
||||||
proto = on_stdin_close(reactor, onclose)
|
transport = on_stdin_close(reactor, onclose)
|
||||||
self.assertEqual(called, [])
|
self.assertEqual(called, [])
|
||||||
|
|
||||||
# on 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
|
# "simulating" a stdin close .. of course, Windows has to be
|
||||||
# difficult
|
# difficult
|
||||||
if platform.isWindows():
|
if platform.isWindows():
|
||||||
proto.writeConnectionLost()
|
transport.writeConnectionLost()
|
||||||
proto.readConnectionLost()
|
transport.readConnectionLost()
|
||||||
else:
|
else:
|
||||||
for reader in reactor.getReaders():
|
for reader in reactor.getReaders():
|
||||||
reader.loseConnection()
|
reader.loseConnection()
|
||||||
@ -670,12 +670,12 @@ class OnStdinCloseTests(SyncTestCase):
|
|||||||
def onclose():
|
def onclose():
|
||||||
called.append(True)
|
called.append(True)
|
||||||
raise RuntimeError("unexpected error")
|
raise RuntimeError("unexpected error")
|
||||||
proto = on_stdin_close(reactor, onclose)
|
transport = on_stdin_close(reactor, onclose)
|
||||||
self.assertEqual(called, [])
|
self.assertEqual(called, [])
|
||||||
|
|
||||||
if platform.isWindows():
|
if platform.isWindows():
|
||||||
proto.writeConnectionLost()
|
transport.writeConnectionLost()
|
||||||
proto.readConnectionLost()
|
transport.readConnectionLost()
|
||||||
else:
|
else:
|
||||||
for reader in reactor.getReaders():
|
for reader in reactor.getReaders():
|
||||||
reader.loseConnection()
|
reader.loseConnection()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user