Annotate
mod_websocket: Merge session close handling changes from mod_c2s (bug fixes)
This should bring some fixes and general robustness that mod_websocket had
missed out on. The duplicated code here is not at all ideal. To prevent this
happening again, we should figure out how to have the common logic in a single
place, while still being able to do the websocket-specific parts that we need.
The main known bug that this fixes is that it's possible for a session to get
into a non-destroyable state. For example, if we try to session:close() a
hibernating session, then session.conn is nil and the function will simply
return without doing anything. In the mod_c2s code we already handle this, and
just destroy the session. But if a hibernating websocket session is never
resumed or becomes non-resumable, it will become immortal!
By merging the fix from mod_c2s, the session should now be correctly
destroyed.
| author |
Matthew Wild <mwild1@gmail.com> |
| date |
Tue, 11 Mar 2025 18:44:40 +0000 |
| parent |
5403:d7ecf6cd584e |
| rev |
line source |
|
5403
|
1
|
|
|
2 The Prosody project is open to contributions (see HACKERS file), but is
|
|
|
3 maintained daily by:
|
|
94
|
4
|
|
5403
|
5 - Matthew Wild (mail: matthew [at] prosody.im)
|
|
|
6 - Waqas Hussain (mail: waqas [at] prosody.im)
|
|
|
7 - Kim Alvefur (mail: zash [at] prosody.im)
|
|
|
8
|
|
|
9 You can reach us collectively by email: developers [at] prosody.im
|
|
|
10 or in realtime in the Prosody chatroom: prosody@conference.prosody.im
|