gen_echoserver: Fix inadequate check of the return value of recv()

This commit is contained in:
Attila Molnar 2014-09-18 02:01:10 +02:00
parent cd6b5cb478
commit 3441525838
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ static void my_rhandler(connection_t * cptr)
{
char buf[BUFSIZE * 2];
if (!my_read(cptr, buf))
if (my_read(cptr, buf) <= 0)
connection_close(cptr);
else
do_packet(cptr, buf);