| 65 | } |
| 66 | |
| 67 | void HttpClient::cleanInactive() |
| 68 | { |
| 69 | debug_d("Total connections: %d", httpConnectionPool.count()); |
| 70 | |
| 71 | size_t i = 0; |
| 72 | while(i < httpConnectionPool.count()) { |
| 73 | auto connection = httpConnectionPool.valueAt(i); |
| 74 | |
| 75 | if(connection->getConnectionState() > eTCS_Connecting && !connection->isActive()) { |
| 76 | debug_d("Removing stale connection: State: %d, Active: %d, Finished: %d", connection->getConnectionState(), |
| 77 | connection->isActive(), connection->isFinished()); |
| 78 | httpConnectionPool.removeAt(i); |
| 79 | } else { |
| 80 | ++i; |
| 81 | } |
| 82 | } |
| 83 | } |
nothing calls this directly
no test coverage detected