From 8199b8b2a4a15a27c8d757c346bf8c72483f80f3 Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Mon, 5 Jun 2023 21:04:44 +0200 Subject: [PATCH] Client - When the remote host closes the connection and we are in `unittest` build then purposefully crash --- source/birchwood/client/client.d | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/birchwood/client/client.d b/source/birchwood/client/client.d index 3a1c563..5e05c72 100644 --- a/source/birchwood/client/client.d +++ b/source/birchwood/client/client.d @@ -1017,6 +1017,13 @@ public class Client : Thread import std.stdio; writeln("(peek) bytesRead: '", bytesRead, "' (status var or count)"); writeln("(peek) currentData: '", currentData, "'"); + + // On remote end closing connection + if(bytesRead == 0) + { + writeln("About to do the panic!"); + *cast(byte*)0 = 2; + } }