websocket: stress-test script against chat app timeout #26
Unanswered
BigBoulard
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
I'm trying to build a chat app that looks like the below simplified version.
What the chat app is doing:
What the stress-test script is doing
Problem
The stress-test script receives a PING frame and tries to send a PONG one but I see no incoming PONG frame in the chat app and the connection is then timed out.
wsconn.ReadMessage() error: read tcp 127.0.0.1:8090->127.0.0.1:55896: i/o timeoutSubsidiary questions
ReadMessage/WriteMessagevsNextReader/NextWriter?WriteMessageto send control frames. I saw that there's alsoWriteControlthat takes a deadline and then callsSetWriteDeadline. I know that unlikeWriteMessage,WriteControlis safe to be used concurrently. The thing is my chat app, I only set a read deadline cause the "idleness" of a connection is detected when the user leaves, so from a server-side perspective, when there's no more data to be read. I don't know how am I supposed to useWriteControlin this context.error:websocket: close 1006 (abnormal closure): unexpected EOF.What can cause this issue cause I don't have much log?
Beta Was this translation helpful? Give feedback.
All reactions