Closed tok-kkk closed 3 years ago
The only reason this condition is here is to ensure that the Goroutine is only spawned once. So it should be fine to add the suggested select statement between L172 and L173. This avoids the deadlock issue.
Fixed as part of PR 56
@rahulghangas Sweet! It would be good to have some regression tests for that if you haven't already added some.
Inside the
channel
package, theclient.Receive()
function won't register receiver functions if you call it more than once. Calls after the first one will just exit and does nothing (since theclient.receiversRunning
has been marked to true)I'm thinking to add
between https://github.com/renproject/aw/blob/27ccfc3bf6e42e58328bafc71802d139da40f6a3/channel/client.go#L171-L172 but I realize it could cause a potential deadlock.
I'll let you guys decide how to fix this.