Set an active command before establishing a connection.
Otherwise the disconnect thread will close the connection due to inactivity. We could add a variable 'isConnecting', but I'm not sure if adding another (ruffy-) global state variable will make things simpler to grasp.
This commit is contained in:
parent
c37310685a
commit
02a9ed6eda
|
@ -170,10 +170,9 @@ public class RuffyScripter {
|
|||
|
||||
synchronized (RuffyScripter.class) {
|
||||
try {
|
||||
ensureConnected();
|
||||
|
||||
final RuffyScripter scripter = this;
|
||||
activeCmd = cmd;
|
||||
ensureConnected();
|
||||
final RuffyScripter scripter = this;
|
||||
final Returnable returnable = new Returnable();
|
||||
Thread cmdThread = new Thread(new Runnable() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue