Don't acknowledge 0 bytes read

This commit is contained in:
Quentin 2019-06-11 18:14:38 +02:00
parent 4a110d9697
commit a822707158

View file

@ -109,7 +109,7 @@ enum FD_STATE read_packet_from_udp (int fd, struct buffer_packet* bp, struct udp
return FDS_ERR;
}
if (nread == -1 && errno == EAGAIN) return FDS_AGAIN;
if (nread == -1 && errno == EAGAIN) return FDS_AGAIN;
if (nread == 0) return FDS_AGAIN;
if (nread == -1) {
fprintf(stderr, "A system error occured\n");
return FDS_ERR;