[racket] cp-write: error writing (Socket is not connected; errno=57)
>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))
_________________________________________________