mirror of https://github.com/deavminet/libdnet.git
`setProperty()` now throws exception on network error
This commit is contained in:
parent
689e2fd592
commit
c3ece5fc00
|
@ -347,15 +347,24 @@ public final class DClient
|
||||||
|
|
||||||
/* Send the protocol data */
|
/* Send the protocol data */
|
||||||
DataMessage protocolData = new DataMessage(reqRepQueue.getTag(), data);
|
DataMessage protocolData = new DataMessage(reqRepQueue.getTag(), data);
|
||||||
bSendMessage(socket, protocolData.encode());
|
bool status = bSendMessage(socket, protocolData.encode());
|
||||||
|
|
||||||
/* Receive the server's response */
|
/* If the send worked */
|
||||||
byte[] resp = reqRepQueue.dequeue().getData();
|
if(status)
|
||||||
|
|
||||||
/* If it worked */
|
|
||||||
if(cast(bool)resp[0])
|
|
||||||
{
|
{
|
||||||
|
/* Receive the server's response */
|
||||||
|
byte[] resp = reqRepQueue.dequeue().getData();
|
||||||
|
|
||||||
|
/* If it worked */
|
||||||
|
if(cast(bool)resp[0])
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* If the send failed */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new DNetworkError("setprop");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue