Fixed segmentation fault

This commit is contained in:
Tristan B. Kildaire 2021-01-30 12:50:44 +02:00
parent 9f7330a3df
commit 068636cde7
1 changed files with 4 additions and 1 deletions

View File

@ -87,6 +87,7 @@ public final class DLink : Thread
/* Set the worker thread for outbound connections */
super(&outboundWorker);
this.server = server;
this.name = name;
this.address = address;
@ -154,6 +155,8 @@ public final class DLink : Thread
byte[] data;
data ~= [1];
gprintln("Here", DebugType.WARNING);
/* TODO: Encode [serverNameLen, serverName] */
string serverName = server.getGeneralConfig().getName();
data ~= [cast(byte)serverName.length];