From 4673e0012faedb36beee84bd4bda4024a3349743 Mon Sep 17 00:00:00 2001 From: interp Date: Fri, 1 Aug 2003 17:40:44 +0000 Subject: [PATCH] `cat ~/diff-sunet/$num/log` --- scheme/httpd/surflets/surflet-handler.scm | 29 +++++++++++------------ 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/scheme/httpd/surflets/surflet-handler.scm b/scheme/httpd/surflets/surflet-handler.scm index d012aa5..2b3eb97 100644 --- a/scheme/httpd/surflets/surflet-handler.scm +++ b/scheme/httpd/surflets/surflet-handler.scm @@ -181,6 +181,7 @@ (with-cwd surflet-path (begin (register-instance! session-id) + (session-adjust-timeout! session-id) (resume s-req))) (bad-request path-string s-req))) (bad-request path-string s-req))) @@ -201,21 +202,19 @@ (session (session-lookup session-id))) ;; the instance might be deleted in the meanwhile (if session - (begin - (session-adjust-timeout! session-id) - (let ((continuations-table (session-continuation-table session)) - (continuation-table-lock (session-continuation-table-lock session)) - (continuation-counter (session-next-continuation-counter session))) - (let ((continuation-id - (with-lock continuation-table-lock - (let ((c-id (generate-new-table-id continuations-table))) - (table-set! continuations-table c-id return) - c-id)))) - (let ((new-url (make-resume-url (session-surflet-name session) - session-id - continuation-counter - continuation-id))) - (make-http-response (response-maker new-url)))))) + (let ((continuations-table (session-continuation-table session)) + (continuation-table-lock (session-continuation-table-lock session)) + (continuation-counter (session-next-continuation-counter session))) + (let ((continuation-id + (with-lock continuation-table-lock + (let ((c-id (generate-new-table-id continuations-table))) + (table-set! continuations-table c-id return) + c-id)))) + (let ((new-url (make-resume-url (session-surflet-name session) + session-id + continuation-counter + continuation-id))) + (make-http-response (response-maker new-url))))) (make-error-response (status-code not-found) #f "The URL refers to a SUrflet, whose session is no longer alive.")))))