Closed kclyu closed 6 years ago
Hm this works fine (client sending pings)
$ libwebsockets-test-server
$ libwebsockets-test-client localhost -p 7681 -n -e -P3
Client is sending PING at 3s intervals and server is responding with PONG immediately.
I poked around a bit and saw the pingpong stuff had accidentally become client-only during the role refactoring before v3.0. I pushed a patch on both master and v3.0-stable that should return it to normal.
Thank you for quick response. ping/pong works well on server. I will close this issue.
f websocket is idle and there is no transmission, try to check if the session is alive using ping / pong. I remember that it worked in the old 2.2 version, but now master / 3.0 does not seem to work.
Below are the log messages tested with 2.2 and 3.0/master's libwebsocket-test-server and client. In 2.2 below, connection is not released by timeout after ping/pong message exchange. In 3.0/master, normal idle session is closed when there is no ping/pong message exchange and timeout occurs.
Even if the server program sends a ping/pong message by modifying the server program, the idle session is closed as well.
Building comand line options and environment
Building command line
Building OS Raspberry PI native/Ubuntu 16.04 Cross Compile (The same result in both environments)
2.2 libwebsockets
server log
client log
master/3.0-stable
server log
client log