File tree 1 file changed +24
-2
lines changed 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 1
1
Add a heartbeat to web socket connections
2
2
3
- This prevents them from being killed when they are idle. To test run behind
4
- NGINX, make sure the sockets are idle (check dev tools), then wait 60+ seconds.
3
+ This prevents them from being killed when they are idle.
4
+
5
+ To test (assuming you're using Linux on Coder):
6
+ 1. Put this in `/etc/nginx/sites-available/default` (delete any existing
7
+ `server` blocks)
8
+
9
+ ```nginx
10
+ server {
11
+ listen 80;
12
+ default_server;
13
+
14
+ location / {
15
+ proxy_pass http://localhost:8080/;
16
+ proxy_set_header Host $host;
17
+ proxy_set_header Upgrade $http_upgrade;
18
+ proxy_set_header Connection upgrade;
19
+ proxy_set_header Accept-Encoding gzip;
20
+ }
21
+ }
22
+ ```
23
+ 2. Run `systemctl reload nginx`
24
+ 3. Open Dev Tools > Network > WS requests
25
+ 4. Make sure their idle > click Messages
26
+ 5. Messages should be 45secs apart
5
27
6
28
Index: code-server/lib/vscode/src/vs/base/parts/ipc/common/ipc.net.ts
7
29
===================================================================
You can’t perform that action at this time.
0 commit comments