mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
race condition first move the command in the rxQueue.
This commit is contained in:
parent
e4ff3089d4
commit
a9e9f9e92b
1 changed files with 5 additions and 5 deletions
|
@ -45,11 +45,6 @@ public class TxThread extends Thread {
|
|||
if (cmd != null) {
|
||||
// Give the command a token and increment.
|
||||
cmd.setToken(token++);
|
||||
// shove in the pipe
|
||||
String str = cmd.toString();
|
||||
OutputStream out = session.getChannelOutputStream();
|
||||
out.write(str.getBytes());
|
||||
out.flush();
|
||||
// Move to the RxQueue only if we have
|
||||
// a valid token, this is to permit input(HACK!)
|
||||
// or commands that do not want to wait for responses.
|
||||
|
@ -57,6 +52,11 @@ public class TxThread extends Thread {
|
|||
CommandQueue rxQueue = session.getRxQueue();
|
||||
rxQueue.addCommand(cmd);
|
||||
}
|
||||
// shove in the pipe
|
||||
String str = cmd.toString();
|
||||
OutputStream out = session.getChannelOutputStream();
|
||||
out.write(str.getBytes());
|
||||
out.flush();
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue