From 4d4401c31f12d5c1ecbcf787510e4f3e03b4848e Mon Sep 17 00:00:00 2001 From: WebFreak001 Date: Wed, 9 Jan 2019 00:28:27 +0100 Subject: [PATCH] Fix assert not compiling in releaseRef --- source/vibe/core/net.d | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/vibe/core/net.d b/source/vibe/core/net.d index b1d7f34..8eb1bb1 100644 --- a/source/vibe/core/net.d +++ b/source/vibe/core/net.d @@ -218,8 +218,10 @@ TCPConnection connectTCP(NetworkAddress addr, NetworkAddress bind_address = anyA ": timeout"); if (status != ConnectStatus.connected) { - if (sock != SocketFD.invalid) - assert(!eventDriver.sockets.releaseRef(sock)); + if (sock != SocketFD.invalid) { + bool refsLeft = eventDriver.sockets.releaseRef(sock); + assert(!refsLeft); + } enforce(false, "Failed to connect to "~addr.toString()~": "~status.to!string); assert(false);