diff --git a/dial_sync.go b/dial_sync.go
index <HASH>..<HASH> 100644
--- a/dial_sync.go
+++ b/dial_sync.go
@@ -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
don't store the active dial if it errors while starting the worker