lipp / lipp/lua-websockets

Clarify on_error/on_close behavior

Open
#63 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
419
Forks
117
PR merge metrics
No merged PRs in 30d

Description

Async client/server
`on_error` calls if there some error befor ws handshake done (IO error/SSL handshake/Invalid token/ protocol) . And in this case `on_close` did not call.
`on_close` calls if ws handshake done. In case of IO error we call `on_close` with `(false, 1001, "Going away"). And in this case`on_error` did not call.

Is it correct behavior?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the async client/server handling for the on_error and on_close callbacks, including behavior before and after the WebSocket handshake. Confirm the intended callback behavior for IO errors, SSL handshake failures, invalid tokens, protocol errors, and close code 1001, then document the decision and verify the examples match it.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
networking
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.