[racket] cp-write: error writing (Socket is not connected; errno=57)

From: Niitsuma Hirotaka (hirotaka.niitsuma at gmail.com)
Date: Fri Jan 21 01:45:35 EST 2011

>Try adding a delay to the loop.

I added (sleep 5) after http-get
But same err was caused

---------
 #lang racket
(require net/url)

 (define (http-get url-as-string)
 (let* ([out (open-output-string)]
         [in (get-pure-port (string->url url-as-string))])
    (copy-port in out)
    (close-input-port in)
    (get-output-string out)))

 (do  ((n 1 (+ 1 n))) ( (= n  1000) n) (http-get "http://localhost/") (sleep 5))
 _________________________________________________


Posted on the users mailing list.