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,8 +347,11 @@ 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());
|
||||||
|
|
||||||
|
/* If the send worked */
|
||||||
|
if(status)
|
||||||
|
{
|
||||||
/* Receive the server's response */
|
/* Receive the server's response */
|
||||||
byte[] resp = reqRepQueue.dequeue().getData();
|
byte[] resp = reqRepQueue.dequeue().getData();
|
||||||
|
|
||||||
|
@ -358,6 +361,12 @@ public final class DClient
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* If the send failed */
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new DNetworkError("setprop");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete's the given property of yourself
|
* Delete's the given property of yourself
|
||||||
|
|
Loading…
Reference in New Issue