Skip to content

Commit

Permalink
remove refsLeft assert
Browse files Browse the repository at this point in the history
It seems when running in a vibe-d app that the assert fails
Even though I would like there to be a check, closing the vibe.d
app afterwards shows no leaked handles so I think it's fine.
  • Loading branch information
WebFreak001 committed Jan 22, 2019
1 parent bee1c62 commit 611505c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions source/vibe/core/net.d
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,8 @@ TCPConnection connectTCP(NetworkAddress addr, NetworkAddress bind_address = anyA
": timeout");

if (status != ConnectStatus.connected) {
if (sock != SocketFD.invalid) {
bool refsLeft = eventDriver.sockets.releaseRef(sock);
assert(!refsLeft);
}
if (sock != SocketFD.invalid)
eventDriver.sockets.releaseRef(sock);

enforce(false, "Failed to connect to "~addr.toString()~": "~status.to!string);
assert(false);
Expand Down

0 comments on commit 611505c

Please sign in to comment.