| 2375 | } |
| 2376 | |
| 2377 | float CUpDownClient::TickDownloadAndMeasure() |
| 2378 | { |
| 2379 | // lfroen: in daemon it actually can happen |
| 2380 | wxASSERT( m_socket ); |
| 2381 | |
| 2382 | float kBpsClient = CalculateKBpsDown(); |
| 2383 | |
| 2384 | if ( m_socket ) { |
| 2385 | // Wake the socket if it suspended last tick because the global |
| 2386 | // CDownloadBandwidthThrottler bucket was empty -- this is the |
| 2387 | // per-tick poke that lets paused reads retry against the |
| 2388 | // freshly refilled budget. |
| 2389 | m_socket->WakeIfPaused(); |
| 2390 | } else { |
| 2391 | AddLogLineNS(CFormat("CAUGHT DEAD SOCKET IN TICKDOWNLOADANDMEASURE() WITH SPEED %f") % kBpsClient); |
| 2392 | } |
| 2393 | |
| 2394 | return kBpsClient; |
| 2395 | } |
| 2396 | |
| 2397 | void CUpDownClient::SetUserIDHybrid(uint32 nUserID) |
| 2398 | { |
no test coverage detected