Permalink
Browse files

Don't spam output on ThreadKilled.

  • Loading branch information...
1 parent 4436496 commit 4473e1ce3b01b18a5ddf4772cf4f3ddc0c9f2a32 @gregorycollins gregorycollins committed Jul 5, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/Snap/Internal/Http/Server.hs
View
4 src/Snap/Internal/Http/Server.hs
@@ -160,6 +160,7 @@ httpServe defaultTimeout ports localHostname alog' elog' initial handler =
where
--------------------------------------------------------------------------
errorHandlers = [ Handler sslException
+ , Handler threadWasKilled
, Handler otherException ]
--------------------------------------------------------------------------
@@ -175,6 +176,9 @@ httpServe defaultTimeout ports localHostname alog' elog' initial handler =
throw e
------------------------------------------------------------------------------
+ threadWasKilled (_ :: AsyncException) = return ()
+
+ ------------------------------------------------------------------------------
otherException (e :: SomeException) = do
let msg = SC.concat [
"Error on startup: \n"

0 comments on commit 4473e1c

Please sign in to comment.