summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Ursetto <jim@3e8.org>2019-01-17 12:16:11 -0600
committerPeter Bex <peter@more-magic.net>2019-01-17 22:20:45 +0100
commit63d72f99d4b2f1acee3474539dd414d153326910 (patch)
tree7a93f72ac3f6aea3b8d470c70dae4a8cc1e6379a
parent00bc862c5915ace3cd63a6f759fe297b85a8a1ea (diff)
downloadspiffy-63d72f99d4b2f1acee3474539dd414d153326910.tar.gz
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 <peter@more-magic.net>
-rw-r--r--spiffy.scm2
1 files changed, 1 insertions, 1 deletions
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 "<p>Your client sent a request that "
"the server did not understand</p>")))
- (unless (##sys#slot out 8) ;; port-closed?
+ (unless (port-closed? out)
(flush-output out))
(handle-another-request?)))))))) ; Keep going?