- handle erroneous `writeFully(byte[])` call in `sendMessage(byte[])`
This commit is contained in:
Tristan B. Velloza Kildaire 2023-04-30 00:55:39 +02:00
parent 3a9fccb3f2
commit 3b57b6c1ae
1 changed files with 11 additions and 5 deletions

View File

@ -139,11 +139,17 @@ public class BClient
/* Add the message to the buffer */
messageBuffer ~= cast(byte[])message;
/* Send the message */
long bytesSent = stream.writeFully(messageBuffer);
/* TODO: Compact this */
return bytesSent > 0;
try
{
/* Send the message */
stream.writeFully(messageBuffer);
return true;
}
catch(StreamException streamError)
{
return false;
}
}
}