Hi,

I am currently working on a multi-platform project and I stumbled on a difference in the behavior of open-tcp-client between MacOSX and Windows (MinGW)  using Gambit-C 4.0 beta20. The difference occurs when I open a connection to an address where no server is running and try to read from it. In MacOSX I get an exception and in Windows I get an infinite loop.

Here is a trivial test:

(define (test-tcpclient)
  (let ((p (open-tcp-client (list server-address: "127.0.0.1"
                                  port-number: 8087
                                  eol-encoding: 'cr-lf
                                  ))))
    (display "test\n\n" p)
    (read-line p)))


On MacOSX I get:

*** ERROR IN ##read-line -- Connection refused
(read-char '#<input-output-port #3 (tcp-client "127.0.0.1" 8087)>)

On Windows I get an infinite loop waiting for the read-line to terminate.

I know I can put some timeout on the read-line but I think the MacOSX behavior is the correct one.

Thank you,
Francois Magnan