diff --git a/libtransmission/tr-dht.c b/libtransmission/tr-dht.c index 5f62725b7..188298c54 100644 --- a/libtransmission/tr-dht.c +++ b/libtransmission/tr-dht.c @@ -543,7 +543,7 @@ tr_dhtStatus( tr_session * session, int af, int * nodes_return ) tr_runInEventThread( session, getstatus, &closure ); while( closure.status < 0 ) - tr_wait_msec( 10 /*msec*/ ); + tr_wait_msec( 50 /*msec*/ ); if( nodes_return ) *nodes_return = closure.count; diff --git a/libtransmission/utils.c b/libtransmission/utils.c index 54d45d4a8..81a1ccf5d 100644 --- a/libtransmission/utils.c +++ b/libtransmission/utils.c @@ -797,7 +797,7 @@ tr_wait_msec( long int msec ) #else struct timespec ts; ts.tv_sec = msec / 1000; - ts.tv_sec = ( msec % 1000 ) * 1000000; + ts.tv_nsec = ( msec % 1000 ) * 1000000; nanosleep( &ts, NULL ); #endif }