Skip to content
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

[websocket_]terminate isn't always called #23

Closed
essen opened this issue Jun 2, 2011 · 5 comments
Closed

[websocket_]terminate isn't always called #23

essen opened this issue Jun 2, 2011 · 5 comments
Milestone

Comments

@essen
Copy link
Member

essen commented Jun 2, 2011

On errors, websocket_terminate isn't called. We probably want to call it anyway so the handler can clean up.

@essen
Copy link
Member Author

essen commented Jun 6, 2011

Same for plain HTTP. We should probably try to call it on error there too. This would avoid initializing things that don't get cleaned up when a crash happens.

@essen
Copy link
Member Author

essen commented Jun 7, 2011

gen_server and others also do this, so let's consider this a bug.

@essen
Copy link
Member Author

essen commented Jun 7, 2011

gen_server and others don't call it for an error in init, we'll do the same and only call for an error in handle.

@essen
Copy link
Member Author

essen commented Jun 7, 2011

I'll wait for real-world examples before implementing this one.

essen pushed a commit that referenced this issue Jul 7, 2011
This ensures that an error thrown in handler_terminate/4 will be
shown after the error from handler_call/6, in the expected order.

As we already call WebSocketHandler:terminate/3, this should
fix issue #23.
@essen
Copy link
Member Author

essen commented Jul 7, 2011

Fixed for both HTTP and WebSocket.

@essen essen closed this as completed Jul 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant