Hi,
In proto_helpers, StringTransportWithDisconnection is implemented as:
class StringTransportWithDisconnection(StringTransport):
def loseConnection(self):
if self.connected:
self.connected = False
self.protocol.connectionLost(error.ConnectionDone("Bye."))
In the API, I see that for IProtocol.connectionLost(reason), readon
should be a Failure and not an Exception.
http://twistedmatrix.com/documents/13.0.0/api/twisted.internet.interfaces.IProtocol.html#connectionLost
------
Also checking some real code in protocols.ftp shows that reason should
be a Failure, as it uses reason.check() method.
https://github.com/twisted/twisted/blob/trunk/twisted/protocols/ftp.py#L2269
------
Is this a bug in the current implementation of
StringTransportWithDisconnection?
Many thanks,
--
Adi Roiban
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python