diff --git a/acceptor.lisp b/acceptor.lisp
index 88118d7..70a8dc2 100644
--- a/acceptor.lisp
+++ b/acceptor.lisp
@@ -493,22 +493,19 @@ errors if *LOG-LISP-ERRORS-P* is set and logs warnings for
                                                        *request* continuation)
   "Mechanism for entering the debugger if an unhandled error occurs
 while handling a request."
-  (let* ((aborted t))
+  (let (unwind-continuation)
     (unwind-protect
-        (let ((*debugger-hook*
-               (lambda (cond prev-hook)
-                 (setf aborted cond)
-                 (let ((*debugger-hook* prev-hook))
-                   (invoke-debugger cond)))))
-          (with-simple-restart (abort "Abort handling ~A ~A"
-                                      (request-method *request*)
-                                      (request-uri *request*))
-            (multiple-value-prog1
-              (funcall continuation)
-              ;; When execution continues, close the stream only if so
-              ;; desired:
-              (setq aborted nil))))
-      (when aborted
-        (when *headers-sent*
-          (setq *close-hunchentoot-stream* t))
-        (throw 'handler-done (values nil aborted))))))
\ No newline at end of file
+         (let ((*debugger-hook*
+                (lambda (cond prev-hook)
+                  (setq unwind-continuation
+                        (lambda ()
+                          (when *headers-sent*
+                            (setq *close-hunchentoot-stream* t))
+                          (throw 'handler-done (values nil cond))))
+                  (let ((*debugger-hook* prev-hook))
+                    (invoke-debugger cond)))))
+           (with-simple-restart (abort "Abort handling ~A ~A"
+                                       (request-method *request*)
+                                       (request-uri *request*))
+             (funcall continuation)))
+      (when unwind-continuation (funcall unwind-continuation)))))
