mirror of
https://github.com/transmission/transmission
synced 2024-12-25 17:17:31 +00:00
(trunk libT) poke at the newfound 100% cpu bug
This commit is contained in:
parent
3e79f4b3fe
commit
ced3e2672f
1 changed files with 5 additions and 2 deletions
|
@ -287,6 +287,7 @@ tr_webThreadFunc( void * vsession )
|
|||
msec = THREADFUNC_MAX_SLEEP_MSEC;
|
||||
if( msec > 0 )
|
||||
{
|
||||
int usec;
|
||||
int max_fd;
|
||||
struct timeval t;
|
||||
fd_set r_fd_set, w_fd_set, c_fd_set;
|
||||
|
@ -299,8 +300,10 @@ tr_webThreadFunc( void * vsession )
|
|||
|
||||
if( msec > THREADFUNC_MAX_SLEEP_MSEC )
|
||||
msec = THREADFUNC_MAX_SLEEP_MSEC;
|
||||
t.tv_sec = 0;
|
||||
t.tv_usec = msec * 1000;
|
||||
|
||||
usec = msec * 1000;
|
||||
t.tv_sec = usec / 1000000;
|
||||
t.tv_usec = usec % 1000000;
|
||||
|
||||
select( max_fd+1, &r_fd_set, &w_fd_set, &c_fd_set, &t );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue