Fixed bug causing select invalid argument on iodined

This commit is contained in:
frekky 2016-02-07 21:59:59 +08:00
parent c8105dcc08
commit 6f43791ebc

View File

@ -273,8 +273,13 @@ window_sending(struct frag_buffer *w, struct timeval *nextresend)
oldest.tv_sec = 0; oldest.tv_sec = 0;
oldest.tv_usec = 0; oldest.tv_usec = 0;
if (w->numitems == 0) if (w->numitems == 0) {
if (nextresend) {
nextresend->tv_sec = 0;
nextresend->tv_usec = 0;
}
return 0; return 0;
}
gettimeofday(&now, NULL); gettimeofday(&now, NULL);