xiezg 发表于 2016-09-08 12:18

FastDFS源代码的BUG2

源文件: libfastcommon/src/sockopt.c
LINE:348

#ifdef USE_SELECT
                if (timeout <= 0)
                {
                        res = select(sock+1, &read_set, NULL, NULL, NULL);
                }
                else
                {
                        t.tv_usec = timeout_ms * 1000;
                        t.tv_sec = timeout_ms / 1000;
                        res = select(sock+1, &read_set, NULL, NULL, &t);
                }
#else

xiezg 发表于 2016-09-08 12:19

t.tv_usec = timeout_ms * 1000;
应该为
t.tv_usec = (timeout_ms%1000) * 1000;

happy_fish100 发表于 2016-09-08 15:44

感谢反馈,已修复这个问题。
页: [1]
查看完整版本: FastDFS源代码的BUG2