On 23/04/2007, at 19:54, Louis Gosselin wrote:
> > > Henrik, > > I believe our programmer here traced back the problem of client > disconnects to the value of wr-res which becomes set to -1 in this > case. > So the condition in the either statement was simply changed to > include it. > > if not ud/result-written > [ > wr-res: write-msg ud/result o/port > either any [logic? wr-res wr-res = -1] > [ > ud/result-written: true > clear-buffer/upto o/port web-clearies ud/request-data > stop o/port > ] > [ > remove/part ud/result wr-res > ]; either > return > ] > > Hope this helps. Unfortunately it doesn't, but this area might be the right place to look. I've implemented your fix anyway. :-) I'm trying to fix when you from the console are sending a large amount of data to the server and the connection is cut. There might be two scenarios happening: 1. Rugby gets all the data (it does not take long to transfer all data between server and client on the same machine). This can be a common case for example in the client console if you press escape just after sending a command. It seems to me that the console does not respond to escape, before the command is fully sent. If your client disappears before the response can be sent back, the Rugby server hangs. 2. Rugby does not get all the data. Perhaps this can be done with a hard cut with Ctrl-C. I admit that this scenario hasn't been tested properly yet, so there may be another challenge there. Anyway, the goal is to prevent this annoying hang at any case. I think the proper way would be to remove the port, if the data can't be sent back. -- Regards, Henrik Mikael Kristensen -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
