Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9897c69

Browse files
committedSep 8, 2022
docs: update heartbeat.diff testing
1 parent 367014a commit 9897c69

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed
 

‎patches/heartbeat.diff

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
11
Add a heartbeat to web socket connections
22

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
527

628
Index: code-server/lib/vscode/src/vs/base/parts/ipc/common/ipc.net.ts
729
===================================================================

0 commit comments

Comments
 (0)
Please sign in to comment.