Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection auto Closed after about 5 seconds when inactive (NO INPUT) #95

Closed
zhongkaiwen opened this issue Mar 12, 2018 · 6 comments
Closed

Comments

@zhongkaiwen
Copy link

zhongkaiwen commented Mar 12, 2018

When I start a new client and immediately type some basic commands, it works just fine. However, the client tells me "Connection Closed" after a while if no commands is put in the browser.

here is the log:

[2018/03/12 11:24:01:0047] NOTICE: wsi 0x60006f320: TIMEDOUT WAITING on 3 (did hdr 0, ah 0x6000606e0, wl 0, pfd events 1)
[2018/03/12 11:24:01:0052] NOTICE: lws_header_table_detach: wsi 0x60006f320: ah held 21s, ah.rxpos 0, ah.rxlen 0, mode/state 0 4,wsi->more_rx_waiting 0
[2018/03/12 11:24:01:0052] NOTICE: wsi 0x60006f110: TIMEDOUT WAITING on 3 (did hdr 0, ah 0x6000614e0, wl 0, pfd events 1)
[2018/03/12 11:24:01:0057] NOTICE: lws_header_table_detach: wsi 0x60006f110: ah held 21s, ah.rxpos 0, ah.rxlen 0, mode/state 0 4,wsi->more_rx_waiting 0
[2018/03/12 11:24:53:9333] WARN: unknown message type: 2
[2018/03/12 11:24:53:9358] NOTICE: sending SIGHUP (1) to process 1272
[2018/03/12 11:24:53:9443] NOTICE: process exited with code 1, pid: 1272
[2018/03/12 11:24:53:9448] NOTICE: WS closed from xx.xxx.xxx.xx(my ip addr ), clients: 0

Additional information:
ttyd version 1.4.0
OS: Windows

@tsl0922
Copy link
Owner

tsl0922 commented Mar 13, 2018

This may be caused by 26f8b17, ttyd 1.4.0 requires libwebsockets 2.1 to have ping-pong support. What's your libwebsockets version?

@hanwckf
Copy link

hanwckf commented Mar 13, 2018

update your libwebsockets

@zhongkaiwen
Copy link
Author

zhongkaiwen commented Mar 14, 2018

@tsl0922
mingw64/mingw-w64-x86_64-libwebsockets 2.1.0-2

@zhongkaiwen
Copy link
Author

@hanwckf
I update libwebsockets to version 2.1.0-2 and json-c to version 0.13_20171207-2, but it still doesn't work

@tsl0922
Copy link
Owner

tsl0922 commented Mar 20, 2018

Clear you browser cache (or use a private window) and try again, ttyd 1.4.0 browser client won't send a message with type 2.

@fangyue6
Copy link

I have the same question

the web console log

ttyd:1 Websocket connection opened ttyd:1 Enabling reconnect: 10 seconds ttyd:1 Websocket connection closed with code: 1006 ttyd:1 Websocket connection opened ttyd:1 Enabling reconnect: 10 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants