# HG changeset patch # User reimar # Date 1335206354 0 # Node ID b89534df8e1e9611e6748656f19ccf8c9db68052 # Parent d180a74b1a898acb7be072e9d0cd617e57a31a0c Detect prematurely closed connection. Then we get a streaming_stopped status but we have a end_pos and have not reached it yet, do not accept it as EOF but instead try reconnection. For example a forced restart of a webserver will usually result in the connection being closed before EOF. diff -r d180a74b1a89 -r b89534df8e1e stream/stream.c --- a/stream/stream.c Sun Apr 22 21:52:39 2012 +0000 +++ b/stream/stream.c Mon Apr 23 18:39:14 2012 +0000 @@ -310,7 +310,8 @@ #ifdef CONFIG_NETWORKING if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) { len=s->streaming_ctrl->streaming_read(s->fd, buf, len, s->streaming_ctrl); - if (s->streaming_ctrl->status == streaming_stopped_e) + if (s->streaming_ctrl->status == streaming_stopped_e && + (!s->end_pos || s->pos == s->end_pos)) s->eof = 1; } else #endif