Commit 51d3696e authored by Adrien Grand's avatar Adrien Grand Committed by Rémi Denis-Courmont

Avoid infinite loop when the telnet session is closed client-side.

Signed-off-by: default avatarRémi Denis-Courmont <rdenis@simphalempin.com>
parent 9563b714
...@@ -379,7 +379,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -379,7 +379,7 @@ static void Run( intf_thread_t *p_intf )
errno = EAGAIN; errno = EAGAIN;
} }
#endif #endif
if (i_recv <= 0 && ( end || errno != EAGAIN ) ) if( i_recv == 0 || ( i_recv == -1 && ( end || errno != EAGAIN ) ) )
goto drop; goto drop;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment