diff options
Diffstat (limited to 'testnet/SimNetSocketManager.hpp')
| -rw-r--r-- | testnet/SimNetSocketManager.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/testnet/SimNetSocketManager.hpp b/testnet/SimNetSocketManager.hpp index 031cbd0c..69f49556 100644 --- a/testnet/SimNetSocketManager.hpp +++ b/testnet/SimNetSocketManager.hpp @@ -32,7 +32,7 @@ #include <utility> #include <queue> -#include "Constants.hpp" +#include "../node/Constants.hpp" #include "../node/SocketManager.hpp" #include "../node/Mutex.hpp" #include "../node/Condition.hpp" @@ -76,7 +76,10 @@ public: inline TransferStats stats(const InetAddress &peer) const { Mutex::Lock _l(_stats_m); - return _stats[peer]; + std::map< InetAddress,TransferStats >::const_iterator s(_stats.find(peer)); + if (s == _stats.end()) + return TransferStats(); + return s->second; } /** |
