diff options
| author | luigi1111 <luigi1111w@gmail.com> | 2019-07-24 14:13:33 -0500 |
|---|---|---|
| committer | luigi1111 <luigi1111w@gmail.com> | 2019-07-24 14:13:33 -0500 |
| commit | 5cecf4138b2d4395a89c1c388170dfec1cada693 (patch) | |
| tree | 4df8c3570dd80be3faff5507123a14d518bd6bb7 | |
| parent | 347d6b268a2a856af7a189e50963ff5e4697abca (diff) | |
| parent | c07bbd5c04f8be6ad19c57077ce80c4304ba92ed (diff) | |
| download | monzero-core-5cecf4138b2d4395a89c1c388170dfec1cada693.tar.gz monzero-core-5cecf4138b2d4395a89c1c388170dfec1cada693.tar.xz monzero-core-5cecf4138b2d4395a89c1c388170dfec1cada693.zip | |
Merge pull request #5573
c07bbd5 daemon: fix 'never seen before' time span display for peers (moneromooo-monero)
| -rw-r--r-- | src/daemon/rpc_command_executor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index e349b7fc3..fedf992f1 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -54,7 +54,7 @@ namespace { std::string id_str; std::string port_str; - std::string elapsed = epee::misc_utils::get_time_interval_string(now - last_seen); + std::string elapsed = peer.last_seen == 0 ? "never" : epee::misc_utils::get_time_interval_string(now - last_seen); std::string ip_str = epee::string_tools::get_ip_string_from_int32(peer.ip); std::stringstream peer_id_str; peer_id_str << std::hex << std::setw(16) << peer.id; |
