Commit acc35e8a authored by vyzo's avatar vyzo

don't store the active dial if it errors while starting the worker

parent 0538806b
......@@ -97,13 +97,14 @@ func (ds *DialSync) getActiveDial(p peer.ID) (*activeDial, error) {
reqch: make(chan DialRequest),
ds: ds,
}
ds.dials[p] = actd
err := ds.dialWorker(adctx, p, actd.reqch)
if err != nil {
cancel()
return nil, err
}
ds.dials[p] = actd
}
// increase ref count before dropping dialsLk
......
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