From ddb5e5ce18197077b6c10a1682a4930647753f73 Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Fri, 3 Jun 2005 13:19:01 +0000 Subject: [PATCH] Closing the log promptly, rather than waiting for the custodian. svn: r57 --- collects/web-server/configuration.ss | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/collects/web-server/configuration.ss b/collects/web-server/configuration.ss index afe149f30e..ce97fb364a 100644 --- a/collects/web-server/configuration.ss +++ b/collects/web-server/configuration.ss @@ -248,11 +248,13 @@ (lambda (host-ip client-ip method uri host) (semaphore-wait outsem) ; do the display all at once by formating first - (display - (format "~s~n" - (list 'from client-ip 'to host-ip 'for (url->string uri) 'at - (date->string (seconds->date (current-seconds)) #t))) - (open-output-file log-path 'append)) + (let ([log-p (open-output-file log-path 'append)]) + (display + (format "~s~n" + (list 'from client-ip 'to host-ip 'for (url->string uri) 'at + (date->string (seconds->date (current-seconds)) #t))) + log-p) + (close-output-file log-p)) (semaphore-post outsem)))) ; ignore-log : sym str -> str str sym url str -> str