[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #833: neuromorpho's http-fetch tries to close output
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #833: neuromorpho's http-fetch tries to close output ports using close-input-port |
Date: |
Sun, 13 May 2012 11:30:54 -0000 |
#833: neuromorpho's http-fetch tries to close output ports using
close-input-port
------------------------+---------------------------------------------------
Reporter: sjamaan | Owner: iraikov
Type: defect | Status: new
Priority: minor | Milestone:
Component: extensions | Version: 4.7.x
Keywords: |
------------------------+---------------------------------------------------
Neuromorpho uses {{{close-input-port}}} twice in the {{{http-fetch}}}
procedure, once for an input port and once for an output port. It looks
like this means the network connection will never be closed (in Unit tcp
both ports need to be closed before the underlying FD is closed).
Simple fix:
{{{
Index: neuromorpho.scm
===================================================================
--- neuromorpho.scm (revision 26685)
+++ neuromorpho.scm (working copy)
@@ -251,7 +251,7 @@
(d "reading chunks ...~%")
(let ([data (read-chunks in)])
(close-input-port in)
- (close-input-port out)
+ (close-output-port out)
(if (not (file-exists? dest)) (mkdir
dest))
(d "writing to ~s~%" filepath)
(with-output-to-file filepath (cut
display data) )
@@ -261,7 +261,7 @@
(d "reading data ...~%")
(let ([data (read-string #f in)])
(close-input-port in)
- (close-input-port out)
+ (close-output-port out)
(if (not (file-exists? dest)) (mkdir
dest))
(d "writing to ~s~%" filepath)
(with-output-to-file filepath (cut
display data) binary:)
}}}
By the way, neuromorpho has no documentation on the wiki. This means it
also won't show up on api.call-cc.org. Since this egg has an official
release it would be nice if there was at least some documentation.
This bug was found by the scrutinizer, see http://tests.call-
cc.org/master/linux/x86/2012/05/12/salmonella-
report/install/neuromorpho.html
--
Ticket URL: <http://bugs.call-cc.org/ticket/833>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #833: neuromorpho's http-fetch tries to close output ports using close-input-port,
Chicken Trac <=