Send status report after SEND_CLIENTS
This commit is contained in:
parent
2993f74b05
commit
ea25aabf26
|
@ -279,7 +279,7 @@ public final class BesterConnection : Thread
|
|||
// dispatchStatus = false;
|
||||
|
||||
/* Send error message to client */
|
||||
sendErrorReport(payloadTag);
|
||||
sendStatusReport(StatusType.FAILURE, payloadTag);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
@ -287,7 +287,7 @@ public final class BesterConnection : Thread
|
|||
debugPrint("fhjhfsdjhfdjhgsdkjh UUUUH:" ~e.toString());
|
||||
|
||||
/* Send error message to client */
|
||||
sendErrorReport(payloadTag);
|
||||
sendStatusReport(StatusType.FAILURE, payloadTag);
|
||||
}
|
||||
|
||||
debugPrint("Handler section done (for client)");
|
||||
|
@ -300,7 +300,7 @@ public final class BesterConnection : Thread
|
|||
debugPrint("No handler available for payload type \"" ~ payloadType ~ "\"");
|
||||
|
||||
/* Send error message to client */
|
||||
sendErrorReport(payloadTag);
|
||||
sendStatusReport(StatusType.FAILURE, payloadTag);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -191,10 +191,11 @@ public final class HandlerResponse
|
|||
|
||||
|
||||
/**
|
||||
* Loop through each BesterConnection in connectionList and
|
||||
* send the message-handler payload response message to each
|
||||
* of them.
|
||||
*/
|
||||
* Loop through each BesterConnection in connectionList and
|
||||
* send the message-handler payload response message to each
|
||||
* of them.
|
||||
*/
|
||||
bool allSuccess = true;
|
||||
for(ulong i = 0; i < connectionList.length; i++)
|
||||
{
|
||||
/* Get the conneciton */
|
||||
|
@ -214,13 +215,14 @@ public final class HandlerResponse
|
|||
catch(SocketOSException exception)
|
||||
{
|
||||
/**
|
||||
* If there was an error sending to the client, this can happen
|
||||
* if the client has disconnected but hasn't yet been removed from
|
||||
* the connections array and hence we try to send on a dead socket
|
||||
* or get the remoteAddress on a dead socket, which causes a
|
||||
* SocketOSException to be called.
|
||||
*/
|
||||
debugPrint("Attempted interacting with dead socket");
|
||||
* If there was an error sending to the client, this can happen
|
||||
* if the client has disconnected but hasn't yet been removed from
|
||||
* the connections array and hence we try to send on a dead socket
|
||||
* or get the remoteAddress on a dead socket, which causes a
|
||||
* SocketOSException to be called.
|
||||
*/
|
||||
debugPrint("Attempted interacting with dead socket");
|
||||
allSuccess=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,9 +231,7 @@ public final class HandlerResponse
|
|||
/**
|
||||
* Send a status report here.
|
||||
*/
|
||||
|
||||
/* TODO: Implement me */
|
||||
sendErrorReport
|
||||
originalRequester.sendStatusReport(cast(BesterConnection.StatusType)!allSuccess, messageResponse["payload"]["id"].str());
|
||||
}
|
||||
else if (commandType == CommandType.SEND_SERVERS)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue