On 01/18/2013 04:32 PM, Rainer Weikusat wrote:
> Alex Rousskov writes:
>> On 01/17/2013 02:53 PM, Rainer Weikusat wrote:
>>> If the write handler was scheduled
>>> by the time timout runs, this happened because 'something definite' is
>>> known about the state of the connection attempt: Either, it suceeded
>>> or the OS returned an error. Throwing this 'real information' away in
>>> order to save a line of code seems not right to me even if it is a
>>> fringe case of a fringe case.
>> As I said, one would not be just saving lines of code. One would be most
>> likely introducing bugs (that is exactly what happened in the past with
>> this code). We have at most two "real information" pieces: a timeout and
>> I/O status. The first to get to ConnOpener wins.
> I think you're right and not checking for this is the better choice.
Glad we agree on this one! Please do not waste your time on recovering
or even thinking about the just-connected state when the timeout won the
race.
Thank you,
Alex.
Received on Sat Jan 19 2013 - 01:02:26 MST
This archive was generated by hypermail 2.2.0 : Sat Jan 19 2013 - 12:00:09 MST