Forum: Ruby while terminating process

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Stuart B. (Guest)
on 2006-06-07 18:22
Hi all

I have writing a program that servers http, very simple, however, if
left for sometime idle the program terminates without error, it is
running a while loop, snip below

while (session = server.accept)
        Thread.new { Send_html.handle_connection(session) }
end

No connections and just looping, then just randomly stops

I start the process from the command line by

ruby http-server 81 &

I get a pid as I would any program, i works fine, then left alone for a
few hours and exits by its self

Many thanks

Stuart
This topic is locked and can not be replied to.