Closed trowski closed 5 years ago
@prolic @kelunik Please review.
Looks good to me. I didn't check for postgres, maybe it's the same problem there? Can you also add a test?
@kelunik As far as I can tell the previous way worked too (edit: nope, cancellation isn't checked until the socket timeout expires), though this way is better since a timeout >10 sec would have been overridden by the socket context.
@prolic I don't think this is a problem in postgres since that library uses loop watchers for connection due to how the extensions work.
Shouldn't TimeoutConnector gain that new context arg as well?
Potentially, but I think it would be better to add another class such as SocketContextConnector
and keep TimeoutConnector
simple.
Any reason why this has not been merged?
Addresses #81.