diff options
Diffstat (limited to 'backend.c')
-rw-r--r-- | backend.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -212,9 +212,11 @@ struct timeval backend_timeout(){ for(u = 0; u < nbackends; u++){ if(backends[u].interval){ res = backends[u].interval(); - if((res / 1000) <= secs){ + if((res / 1000) < secs){ secs = res / 1000; - if((res % 1000) < msecs){ + msecs = res % 1000; + } + else if(res / 1000 == secs && (res % 1000) < msecs){ msecs = res % 1000; } } |