fix(pool): roll back failed submit tracking
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
d43c8ee4c1
commit
264479d57b
1 changed files with 5 additions and 1 deletions
|
|
@ -138,7 +138,11 @@ func (c *StratumClient) Submit(jobID, nonce, result, algo string) int64 {
|
|||
"algo": algo,
|
||||
},
|
||||
}
|
||||
_ = c.writeJSON(req)
|
||||
if err := c.writeJSON(req); err != nil {
|
||||
c.mu.Lock()
|
||||
delete(c.pending, seq)
|
||||
c.mu.Unlock()
|
||||
}
|
||||
return seq
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue