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
1 changed files with 2 additions and 3 deletions
|
@ -170,10 +170,9 @@ public class RuffyScripter {
|
||||||
|
|
||||||
synchronized (RuffyScripter.class) {
|
synchronized (RuffyScripter.class) {
|
||||||
try {
|
try {
|
||||||
ensureConnected();
|
|
||||||
|
|
||||||
final RuffyScripter scripter = this;
|
|
||||||
activeCmd = cmd;
|
activeCmd = cmd;
|
||||||
|
ensureConnected();
|
||||||
|
final RuffyScripter scripter = this;
|
||||||
final Returnable returnable = new Returnable();
|
final Returnable returnable = new Returnable();
|
||||||
Thread cmdThread = new Thread(new Runnable() {
|
Thread cmdThread = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue