mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-16 15:57:38 +00:00
Fix summary API endpoint returning corrupted JSON
Upon startup, until statistics for all intervals were available, the http response for the `summary` endpoint would be corrupted.
This commit is contained in:
parent
8084ff37a5
commit
b60616a7ad
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ public:
|
|||
~Hashrate();
|
||||
|
||||
inline double calc(size_t ms) const { const double data = hashrate(0U, ms); return std::isnormal(data) ? data : 0.0; }
|
||||
inline double calc(size_t threadId, size_t ms) const { return hashrate(threadId + 1, ms); }
|
||||
inline double calc(size_t threadId, size_t ms) const { const double data = hashrate(threadId + 1, ms); return std::isnormal(data) ? data : 0.0; }
|
||||
inline size_t threads() const { return m_threads > 0U ? m_threads - 1U : 0U; }
|
||||
inline void add(size_t threadId, uint64_t count, uint64_t timestamp) { addData(threadId + 1U, count, timestamp); }
|
||||
inline void add(uint64_t count, uint64_t timestamp) { addData(0U, count, timestamp); }
|
||||
|
|
Loading…
Reference in a new issue