Fix the approach to determine connect failures.
On macOS it could happen that both, onConnect and onConnectError, were triggered, resulting in seemingly overlapping connection attempts when they really were sequential. This in turn triggered a connection error leak test in vibe-core. Now using only the write-ready flag plus the reported socket error status to determine failed connections, guaranteeing a single call back.
This commit is contained in:
parent
4813cba338
commit
b32b329d15
3 changed files with 35 additions and 29 deletions
|
@ -28,6 +28,7 @@ void main()
|
|||
eventDriver.timers.wait(tm, (tm) {
|
||||
assert(eventDriver.sockets.getConnectionState(sock) == ConnectionState.connecting);
|
||||
eventDriver.sockets.cancelConnectStream(sock);
|
||||
eventDriver.sockets.releaseRef(sock);
|
||||
s_done = true;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue