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 */
|
||||
DataMessage protocolData = new DataMessage(reqRepQueue.getTag(), data);
|
||||
bSendMessage(socket, protocolData.encode());
|
||||
bool status = bSendMessage(socket, protocolData.encode());
|
||||
|
||||
/* Receive the server's response */
|
||||
byte[] resp = reqRepQueue.dequeue().getData();
|
||||
|
||||
/* If it worked */
|
||||
if(cast(bool)resp[0])
|
||||
/* If the send worked */
|
||||
if(status)
|
||||
{
|
||||
|
||||
/* 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