Doesn't the exception bubble up to the caller of create_connection()? So
what's the problem?

On Wed, Jan 28, 2015 at 5:19 PM, Victor Stinner <victor.stin...@gmail.com>
wrote:

> Hi,
>
> 2015-01-27 23:48 GMT+01:00 Antoine Pitrou <solip...@pitrou.net>:
> > 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
>



-- 
--Guido van Rossum (python.org/~guido)

Reply via email to