mirror of
https://github.com/besterprotocol/bformat
synced 2023-12-13 21:30:24 +01:00
BClient
- handle erroneous `writeFully(byte[])` call in `sendMessage(byte[])`
This commit is contained in:
parent
3a9fccb3f2
commit
3b57b6c1ae
1 changed files with 11 additions and 5 deletions
|
@ -139,11 +139,17 @@ public class BClient
|
|||
/* Add the message to the buffer */
|
||||
messageBuffer ~= cast(byte[])message;
|
||||
|
||||
try
|
||||
{
|
||||
/* Send the message */
|
||||
long bytesSent = stream.writeFully(messageBuffer);
|
||||
stream.writeFully(messageBuffer);
|
||||
|
||||
/* TODO: Compact this */
|
||||
return bytesSent > 0;
|
||||
return true;
|
||||
}
|
||||
catch(StreamException streamError)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue