| 1442 | } |
| 1443 | |
| 1444 | bool HttpConnectionsPool::deactivate(HttpConnection::ID connectionID) |
| 1445 | { |
| 1446 | HttpConnection& connection = connections[connectionID.index]; |
| 1447 | if (connection.state == HttpConnection::State::Inactive) |
| 1448 | { |
| 1449 | return false; |
| 1450 | } |
| 1451 | |
| 1452 | connection.reset(); |
| 1453 | numConnections--; |
| 1454 | |
| 1455 | if (numConnections == 0) |
| 1456 | { |
| 1457 | highestActiveConnection = 0; |
| 1458 | } |
| 1459 | else if (connectionID.index == highestActiveConnection) |
| 1460 | { |
| 1461 | while (highestActiveConnection > 0 and |
| 1462 | connections[highestActiveConnection].state == HttpConnection::State::Inactive) |
| 1463 | { |
| 1464 | highestActiveConnection--; |
| 1465 | } |
| 1466 | } |
| 1467 | return true; |
| 1468 | } |
| 1469 | |
| 1470 | Result HttpConnectionsPool::Memory::assignTo(HttpConnectionsPool::Configuration conf, |
| 1471 | SpanWithStride<HttpConnection> connectionsSpan) |
no test coverage detected