diff --git a/source/bformat/sockets.d b/source/bformat/sockets.d index c4b9818..f3814f1 100644 --- a/source/bformat/sockets.d +++ b/source/bformat/sockets.d @@ -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; + } } }