Hi,

2015-01-27 23:48 GMT+01:00 Antoine Pitrou <[email protected]>:
> This is a breach of the API's contract.

I agree, that's why I opened an issue and start a thread on this mailing list.

> Once I proposed a separate connection_failed() for that purpose.
> It was shut down, but it can still be reintroduced.

Good idea. I wrote a patch to add a new
Protocol.connection_failed(transport, exc) method:
http://bugs.python.org/issue23333

What do you think of this new method?

It is called if the transport raises an exception before
protocol.connection_made() is called.

Currently, my patch only calls the connection_failed() in the
coroutine handling an incoming client connection for a server. We may
also change other functions creating pairs of (transport, protocol).
These methods currently only call transport.close() on error.

Victor

Reply via email to