dylan-lang / http

HTTP server and client for Dylan
https://opendylan.org/package/http
MIT License
22 stars 11 forks source link

End of stream error when running the server #18

Open rlander opened 11 years ago

rlander commented 11 years ago

Hi!

I'm following the tutorials on https://github.com/dylan-lang/http/tree/master/server/examples/web-in-60 . The code compiles fine, the webserver starts but I'm getting an "End of stream" error:

    2013-01-13T20:25:42.000+0000 info  [Master thread] Starting HTTP Server HTTP Server
    2013-01-13T20:25:42.000+0000 info  [Master thread] Server root directory is /vagrant/dylan-progs/web60-dynamic-content/_build/bin/../
    2013-01-13T20:25:42.000+0000 debug [Master thread] Attempting connection to HTTP Listener for 0.0.0.0:8887 via 127.0.0.1
    2013-01-13T20:25:42.000+0000 info  [HTTP Listener for 0.0.0.0:8887] HTTP Listener for 0.0.0.0:8887 ready for service
    2013-01-13T20:25:42.000+0000 debug [Master thread] Connection to HTTP Listener for 0.0.0.0:8887 successful
    2013-01-13T20:25:42.000+0000 info  [Master thread] HTTP Server 0.9 ready for service
    2013-01-13T20:25:42.000+0000 debug [HTTP Responder 1] Error handling request: End of stream {<byte-char-tcp-socket>}
waywardmonkeys commented 11 years ago

This is normal and can be ignored. After the server starts up, it connects to itself just to be sure the port is open. I'm not convinced of the utility of this and I also dislike the error message.

waywardmonkeys commented 11 years ago

I'm willing to leave this open so that we fix it. You aren't the first to ask about it.

cgay commented 11 years ago

Not sure why I thought this was necessary at the time. Possibly there was a bug in shutting down if the port was already in use. It's fine with me if it's removed, especially since one can listen on multiple ports now and it's not clear shutting down would be the right thing in any case.