Commit 730e6a8a authored by muXxer's avatar muXxer

Fixed send on closed outgoingReq channel again :carlos:

parent be38062c
......@@ -194,8 +194,13 @@ func (client *PowClient) PowFunc(trytes trinary.Trytes, minWeightMagnitude int,
client.requestIDLock.Unlock()
pendingPowRequest := PendingPowRequest{powRequest: &api.PowRequest{Identifier: reqID, Trytes: string(trytes), Mwm: uint32(minWeightMagnitude)}, powResponseChan: make(chan *api.PowResponse, 1)}
if !client.signalClosed {
client.outgoingReq <- pendingPowRequest
select {
case <-client.signalChanQuit:
return "", errors.New("PowClient was closed")
case client.outgoingReq <- pendingPowRequest:
}
select {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment