-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing function clause in terminate callback (cowboy adapter) #19
Comments
Thanks for this - could you provide a more complete stacktrace so I can better figure out where this is happening? |
|
It looks like it's an issue with a crash during the upgrade process. It also looks like you may be returning tuple elements in the wrong order when you upgrade; I see |
It definitely happened after the upgrade in the There was a clause error in the part not related to the ws, and the standard clause elixir error is passed to the terminate callback, which in turn raises the clause error also. P.S.: after fixing the clause error bug in the internal module, the error gone, but it looks like the terminate callback would raise in case of some other error also. |
Glad to hear you (sort of) got sorted. It would be immensely helpful to have a minimal repro for this, either as a Garyfile or a repo |
Sure, I'll prepare it in a couple of days. |
https://github.com/focused/websock_adapter_app/tree/main Just run
|
Fix for this up at #20! |
When I got an error the terminate callback can not handle it correctly:
Source:
websock_adapter/lib/websock_adapter/cowboy_adapter.ex
Line 71 in c4c6ea6
It looks like the
terminate
callback awaits 2-elem tuple in the 3rd argument:terminate(reason, _req, {handler, state})
, but there are 3 elements - ws handler module, some empty map (%{}
) and the WS handler state.Package versions:
The text was updated successfully, but these errors were encountered: