cretz / bine

Go library for accessing and embedding Tor clients and servers
MIT License
763 stars 71 forks source link

EnableNetwork ignores `wait` if already enabled #38

Open karalabe opened 4 years ago

karalabe commented 4 years ago

If the node already has networking enabled - but has not yet finished building its circuits - EnableNetwork will abort at https://github.com/cretz/bine/blob/master/tor/tor.go#L370 even if wait set set to true. This might have unintended side effects for code that expects the circuits to be done, e.g. https://github.com/cretz/bine/blob/master/tor/listen.go#L259

cretz commented 3 years ago

Hrmm, I suppose the fix here is to have enable network check bootstrapped even when already enabled. May still have event part ahead of time set per #40. Will investigate.