> On Jan 29, 2015, at 4:20 AM, Victor Stinner <[email protected]> wrote: > > Should I understand that you are against the addition of a new > connection_failed() method?
As we've been discussing this, the only unifying factor I can see is that there are a lot of implementation accidents that lead to vaguely bad stuff happening that an application might want to ... log, I guess? The problem I'm having with such a method is that it doesn't seem to indicate anything that can be unified into a single coherent failure mode. For example, if you have connection_lost, this means very different things for a UNIX socket, the end of a file that is being read, a failed TLS MAC, or a TCP connection getting a FIN or RST, but abstractly all of them indicate "the connection ended". connection_failed, by contrast, just seems to mean "some stuff happened to some sockets, maybe you'd like to know", so I'm having a lot of trouble imagining what kind of code a correctly-written application would put into this method other than logging; and even for logging, it's not clear it would know what to log without intimate knowledge of the implementation of every transport. So how do you imagine this would be used? -glyph
