felix winkelmann wrote:
On Mon, Apr 6, 2009 at 1:22 AM, Matt Jones <[email protected]> wrote:
(BTW, this part of my message above

The function 'fail appears to close the port -- (##net#close s) --
but somehow these ports end up open and accumulate.
refers to the code in Chicken's tcp.scm, in the definition of tcp-connect,
not my code.  My code isn't trying to close the port.  My point there was
that tcp-connect appears to close the port before signalling an exception,
yet the port remains open.  I realize that was probably unclear.)

Yes, I was talking about the chicken code. It's a bug and we'll fix it,
but we have to figure out first what exactly is happening.


cheers,
felix



Ah, I found the problem. My first analysis was wrong. In fact, after line 609 in tcp.scm in the version 3.4 source, the port isn't closed before signalling the exception:

      (let ((err (get-socket-error s)))
        (cond ((= err -1)
               ; Not closed here
               ...)
              ((> err 0)
               ; Not closed here
               ...)))

Just adding the line (##net#close s) fixes the problem.

Good job on the version 4 release!

Best
Matt


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to