Remove idle timeout from websocket-based remote debugger

This commit is contained in:
konsoletyper 2014-10-04 12:50:44 +04:00
parent 7b4a7fc471
commit 9535d024e4
2 changed files with 3 additions and 4 deletions

View File

@ -76,6 +76,7 @@ public class ChromeRDPDebugger implements JavaScriptDebugger, ChromeRDPExchangeC
} }
} else { } else {
suspended = false; suspended = false;
callStack = null;
for (JavaScriptDebuggerListener listener : getListeners()) { for (JavaScriptDebuggerListener listener : getListeners()) {
listener.detached(); listener.detached();
} }

View File

@ -18,10 +18,7 @@ package org.teavm.chromerdp;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.websocket.OnClose; import javax.websocket.*;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint; import javax.websocket.server.ServerEndpoint;
/** /**
@ -37,6 +34,7 @@ public class ChromeRDPDebuggerEndpoint implements ChromeRDPExchange {
@OnOpen @OnOpen
public void open(Session session) { public void open(Session session) {
this.session = session; this.session = session;
session.setMaxIdleTimeout(0);
Object debugger = session.getUserProperties().get("chrome.rdp"); Object debugger = session.getUserProperties().get("chrome.rdp");
if (debugger instanceof ChromeRDPExchangeConsumer) { if (debugger instanceof ChromeRDPExchangeConsumer) {
this.debugger = (ChromeRDPExchangeConsumer)debugger; this.debugger = (ChromeRDPExchangeConsumer)debugger;