From 63d72f99d4b2f1acee3474539dd414d153326910 Mon Sep 17 00:00:00 2001 From: Jim Ursetto Date: Thu, 17 Jan 2019 12:16:11 -0600 Subject: Use port-closed? instead of ##sys#slot, fixing output hangs Port slot 8 (closed?) changed from a bool to a fixnum in Chicken 5, which made the existing port closed test always succeed, so output was never flushed. This can lead to hangs when output size is less than tcp-buffer-size. Use the official accessor instead. Signed-off-by: Peter Bex --- spiffy.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spiffy.scm b/spiffy.scm index 83f51cf..83fe21b 100644 --- a/spiffy.scm +++ b/spiffy.scm @@ -531,7 +531,7 @@ (send-status 'bad-request (conc "

Your client sent a request that " "the server did not understand

"))) - (unless (##sys#slot out 8) ;; port-closed? + (unless (port-closed? out) (flush-output out)) (handle-another-request?)))))))) ; Keep going? -- cgit v1.2.3