WebSocket: On_Close called when user explicitly closes a web socket via AWS.Net.WebSocket.Registry.Close
Nobody has claimed this yet.
- Dominant language
- Ada
- Stars
- 162
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
Description
In AWS.Net.WebSocket.Close implementation, it is documented that
-- When the user explicitly closes a web socket, we do not call
-- On_Close (this is only called when the other end closes the socket)
However, when the user explicitly closes a web socket via AWS.Net.WebSocket.Registry.Close, On_Close is called
Patch
aws-net-websocket-registry.adb.patch.txt
Different behavior in AWS.Net.WebSocket.Registry.Close implementations
On another note, calling AWS.Net.WebSocket.Registry.Close(Socket : in out Object'Class; internally calls Socket.Shutdown while calling AWS.Net.WebSocket.Registry.Close(To : Recipient; does not. Any rational on why having different behaviour ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documented AWS.Net.WebSocket.Close behavior, then inspect the two AWS.Net.WebSocket.Registry.Close entry points: the Object'Class overload and the Recipient overload. Compare their handling of On_Close and Socket.Shutdown with the attached aws-net-websocket-registry.adb.patch.txt; done means explicit closure no longer invokes On_Close and the differing Shutdown behavior is resolved or clearly justified.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100