eclipse-theia / eclipse-theia/theia
Debug session should be resilient to brief web-socket disconnects
- Dominant language
- TypeScript
- Stars
- 21.7k
- Forks
- 2.9k
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 35
Description
### Rationale
Long living tcp connections, especially over internet are expected to experience disconnects Theia should be resilient to such disconnects also during debug session.
### Suggested behavior
If the disconnect period is shorter than a predefined threshold the debug session resumes after the reconnect. After the timeout threshold, the behavior should be as today for node.js - session reset.
### Reproduction Steps
- Start node debug session
- Simulate web-socket disconnect
To simulate web-socket disconnects, one can use this code for reverse proxy, and access theia via port 3001
```
var express = require('express');
var app = express();
var httpProxy = require('http-proxy');
var proxy = httpProxy.createProxyServer({ target: 'http://localhost:3000', ws: true });
var server = require('http').createServer(app);
// proxy HTTP GET / POST
app.get('/*', function(req, res) {
console.log("proxying GET request", req.url);
proxy.web(req, res, {});
});
app.post('/*/*', function(req, res) {
console.log("proxying POST request", req.url);
proxy.web(req, res, {});
});
// Proxy websockets
server.on('upgrade', function (req, socket, head) {
console.log("proxying upgrade request", req.url);
proxy.ws(req, socket, head);
});
server.listen(3001);
```
### OS and Theia version:
OS: Debian GNU/Linux
Thiea: 0.4.0
Contributor guide
Assessment
This issue has not been assessed yet.