-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cleanup code doesn't get run after a tryAny
of Snap's httpServe
#8
Comments
If I remember correctly, snap has a broken instance of some of the On Wed, Jul 1, 2015, 1:22 AM Chris Allen notifications@github.com wrote:
|
@snoyberg This is what the Snap people said, but it doesn't really explain to me what's going on here.
|
I take it back, I misread the original code. This isn't an issue of listed On Wed, Jul 1, 2015, 4:32 PM Chris Allen notifications@github.com wrote:
|
@snoyberg bahhh my bad – should've read docstring more carefully. Thank you! |
For the record, now that I've landed and can think clearly: the broken instance I was referring to is that snap is depending on MonadCatchIO-transformers, and provides a broken instance for Iteratee (it's trivial to break |
This works fine.
This doesn't run our cleanup code.
I'm a bit flabbergasted as to why a lifted
try
would cause different behavior here, any ideas?Repro:
Ctrl-C while blocking on a Snap server in GHCi
Good code runs our cleanup process, output like this:
Bad code shuts the Snap server down, but none of our secondary services get shut down and none of the logging associated with the cleanup runs. Output like this:
Only Snap's signal handling is getting run.
What did I do wrong?
The text was updated successfully, but these errors were encountered: