Fix WinXP version of thrift_poll to not use destructed time_out

This commit is contained in:
tpcwang 2016-10-04 09:34:37 -07:00
parent b0dadbde6a
commit d1c0d33199

View File

@ -67,7 +67,8 @@ int thrift_poll(THRIFT_POLLFD* fdArray, ULONG nfds, INT timeout) {
timeval time_out;
timeval* time_out_ptr = NULL;
if (timeout >= 0) {
timeval time_out = {timeout / 1000, (timeout % 1000) * 1000};
time_out.tv_sec = timeout / 1000;
time_out.tv_usec = (timeout % 1000) * 1000;
time_out_ptr = &time_out;
} else { // to avoid compiler warnings
(void)time_out;