mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 10:32:57 +01:00
Use Int64 for TcpServerDispatcher::totalConnections(), to prevent overflow
This commit is contained in:
parent
e4aaeacea8
commit
63bed8c8d3
@ -175,7 +175,7 @@ public:
|
||||
int maxThreads() const;
|
||||
/// Returns the maximum number of threads available.
|
||||
|
||||
int totalConnections() const;
|
||||
Int64 totalConnections() const;
|
||||
/// Returns the total number of handled connections.
|
||||
|
||||
int currentConnections() const;
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
int maxThreads() const;
|
||||
/// Returns the maximum number of threads available.
|
||||
|
||||
int totalConnections() const;
|
||||
Int64 totalConnections() const;
|
||||
/// Returns the total number of handled connections.
|
||||
|
||||
int currentConnections() const;
|
||||
@ -103,12 +103,12 @@ private:
|
||||
|
||||
std::atomic<int> _rc;
|
||||
TCPServerParams::Ptr _pParams;
|
||||
std::atomic<int> _currentThreads;
|
||||
std::atomic<int> _totalConnections;
|
||||
std::atomic<int> _currentConnections;
|
||||
std::atomic<int> _maxConcurrentConnections;
|
||||
std::atomic<int> _refusedConnections;
|
||||
std::atomic<bool> _stopped;
|
||||
std::atomic<int> _currentThreads;
|
||||
std::atomic<Int64> _totalConnections;
|
||||
std::atomic<int> _currentConnections;
|
||||
std::atomic<int> _maxConcurrentConnections;
|
||||
std::atomic<int> _refusedConnections;
|
||||
std::atomic<bool> _stopped;
|
||||
Poco::NotificationQueue _queue;
|
||||
TCPServerConnectionFactory::Ptr _pConnectionFactory;
|
||||
Poco::ThreadPool& _threadPool;
|
||||
|
@ -185,7 +185,7 @@ int TCPServer::maxThreads() const
|
||||
}
|
||||
|
||||
|
||||
int TCPServer::totalConnections() const
|
||||
Int64 TCPServer::totalConnections() const
|
||||
{
|
||||
return _pDispatcher->totalConnections();
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ int TCPServerDispatcher::maxThreads() const
|
||||
}
|
||||
|
||||
|
||||
int TCPServerDispatcher::totalConnections() const
|
||||
Int64 TCPServerDispatcher::totalConnections() const
|
||||
{
|
||||
return _totalConnections;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user