1
0
mirror of https://github.com/deavminet/dnetd synced 2024-09-21 17:53:39 +02:00

Handle error

This commit is contained in:
Tristan B. Kildaire 2020-12-04 14:11:55 +02:00
parent a246ef1d73
commit d1e1297a26

View File

@ -54,6 +54,12 @@ public final class DPlugin
/* TODO: Error handling */ /* TODO: Error handling */
status = sendMessage(socket, data); status = sendMessage(socket, data);
/* Encode the status in the reply */
response ~= [status];
/* If the send succeeded */
if(status)
{
/* Get the reply */ /* Get the reply */
/* TODO: Error handling */ /* TODO: Error handling */
byte[] reply; byte[] reply;
@ -62,11 +68,9 @@ public final class DPlugin
/* Close the connetion to the plugin server */ /* Close the connetion to the plugin server */
socket.close(); socket.close();
/* Encode the status in the reply */
response ~= [status];
/* Encode the response */ /* Encode the response */
response ~= reply; response ~= reply;
}
return response; return response;
} }