Re: [python-tulip] Call protocol.connection_lost() when the creation of transport failed?

2015-01-28 Thread Glyph
Twisted always immediately reports the connectionMade to the application-level protocol, so a TLS protocol's connectionMade means the same thing as a TCP protocol's connectionMade. If you call self.transport.write on a TLS transport which has not yet succeeded at verifying its peer, the bytes

Re: [python-tulip] Re: Call protocol.connection_lost() when the creation of transport failed?

2015-01-28 Thread Victor Stinner
2015-01-29 2:47 GMT+01:00 Guido van Rossum gu...@python.org: Doesn't the exception bubble up to the caller of create_connection()? Yes, it does. So what's the problem? The problem is in server which accepts incoming connections: BaseSelectorEventLoop._accept_conncetion(). Extract of the

Re: [python-tulip] Re: Call protocol.connection_lost() when the creation of transport failed?

2015-01-28 Thread Guido van Rossum
What would Twisted do? (WWTD) On Wed, Jan 28, 2015 at 6:20 PM, Victor Stinner victor.stin...@gmail.com wrote: 2015-01-29 2:47 GMT+01:00 Guido van Rossum gu...@python.org: Doesn't the exception bubble up to the caller of create_connection()? Yes, it does. So what's the problem? The

Re: [python-tulip] Re: Call protocol.connection_lost() when the creation of transport failed?

2015-01-28 Thread Guido van Rossum
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,