Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
on the first RC debug request, naoth returned command id "0" and the MessageServer "crashed" ... the first command id is now "1"!
one of the easiest bug fixes i fixed! :P
  • Loading branch information
strouble committed May 6, 2017
1 parent d8b99fc commit b1d5c5e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -58,7 +58,7 @@ public SingleExecEntry(ResponseListener sender, Command command) {
private final Map<Integer, SingleExecEntry> answerRequestMap = Collections.synchronizedMap(new HashMap<Integer, SingleExecEntry>());

// each sent command has a unique id, which is used to assign the responces correctly
private Integer commandId = 0;
private Integer commandId = 1;

// just for statistics
private long receivedBytes;
Expand Down Expand Up @@ -314,6 +314,7 @@ private void pollAnswers() throws IOException {
int id = idBuffer.getInt();

if (id == 0) {
// shouldn't be happening anymore, "commandId" is initialized with "1"!
Logger.getLogger(MessageServer.class.getName()).log(Level.WARNING,
"Ignore illegal response ID '0'. Why is this happening?!!");
break;
Expand Down

0 comments on commit b1d5c5e

Please sign in to comment.