chat fixes

This commit is contained in:
C.S 2020-12-24 17:11:24 -08:00
parent d908527792
commit 5e9ccf42a3
2 changed files with 4 additions and 4 deletions

View File

@ -385,6 +385,9 @@ func MiningLoop(jobChan <-chan *client.MultiClientJob, done chan<- bool) {
} else {
crylog.Info(infoStr, " Mining: ACTIVE")
}
if job.ChatToken != chat.NextToken() {
go GetChats()
}
case <-time.After(30 * time.Second):
break
@ -392,10 +395,6 @@ func MiningLoop(jobChan <-chan *client.MultiClientJob, done chan<- bool) {
stopWorkers()
if job.ChatToken != chat.NextToken() {
go GetChats()
}
// Check if we need to reinitialize rx dataset
newSeed, err := hex.DecodeString(job.SeedHash)
if err != nil {

View File

@ -219,6 +219,7 @@ func (cl *Client) Connect(
cl.responseChannel = make(chan *Response)
cl.alive = true
jc := make(chan *MultiClientJob)
response.Result.Job.ChatToken = response.ChatToken
go dispatchJobs(cl.conn, jc, response.Result.Job, cl.responseChannel)
if response.Warning != nil {
return nil, response.Warning.Code, response.Warning.Message, jc