mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-13927 Debugger: Timeout waiting for response on 113 when viewing watches
Getting the next sequence number was not synchronized. Sometimes it returned the same value for different commands and lost some responses.
This commit is contained in:
@@ -55,6 +55,7 @@ public class RemoteDebugger implements ProcessDebugger {
|
||||
private Socket mySocket;
|
||||
private volatile boolean myConnected = false;
|
||||
private int mySequence = -1;
|
||||
private final Object mySequenceObject = new Object(); // for synchronization on mySequence
|
||||
private final Map<String, PyThreadInfo> myThreads = new ConcurrentHashMap<String, PyThreadInfo>();
|
||||
private final Map<Integer, ProtocolFrame> myResponseQueue = new HashMap<Integer, ProtocolFrame>();
|
||||
private final TempVarsHolder myTempVars = new TempVarsHolder();
|
||||
@@ -285,8 +286,10 @@ public class RemoteDebugger implements ProcessDebugger {
|
||||
}
|
||||
|
||||
int getNextSequence() {
|
||||
mySequence += 2;
|
||||
return mySequence;
|
||||
synchronized (mySequenceObject) {
|
||||
mySequence += 2;
|
||||
return mySequence;
|
||||
}
|
||||
}
|
||||
|
||||
void placeResponse(final int sequence, final ProtocolFrame response) {
|
||||
|
||||
Reference in New Issue
Block a user