mod_websocket: Fire pre-session-close event (fixes #1800)
This event was added in a7c183bb4e64 and is required to make mod_smacks know
that a session was intentionally closed and shouldn't be hibernated (see
fcea4d9e7502).
Because this was missing from mod_websocket's session.close(), mod_smacks
would always attempt to hibernate websocket sessions even if they closed
cleanly.
That mod_websocket has its own copy of session.close() is something to fix
another day (probably not in the stable branch). So for now this commit makes
the minimal change to get things working again.
Thanks to Damian and the Jitsi team for reporting.
local record state
enum waiterr
"timeout"
"signal"
end
add : function (state, integer, boolean, boolean) : boolean
add : function (state, integer, boolean, boolean) : nil, string, integer
set : function (state, integer, boolean, boolean) : boolean
set : function (state, integer, boolean, boolean) : nil, string, integer
del : function (state, integer) : boolean
del : function (state, integer) : nil, string, integer
wait : function (state, integer) : integer, boolean, boolean
wait : function (state, integer) : nil, string, integer
wait : function (state, integer) : nil, waiterr
getfd : function (state) : integer
end
local record lib
new : function () : state
EEXIST : integer
EMFILE : integer
ENOENT : integer
enum api_backend
"epoll"
"poll"
"select"
end
api : api_backend
end
return lib