1
0
Fork 0
mirror of https://github.com/besterprotocol/bformat synced 2023-12-13 21:30:24 +01:00
- 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

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);
try
{
/* Send the message */
stream.writeFully(messageBuffer);
/* TODO: Compact this */
return bytesSent > 0;
return true;
}
catch(StreamException streamError)
{
return false;
}
}
}