Closed karalabe closed 10 years ago
Oh yeah, this works as intended. Maybe a bit odd, but for now it's good. Since a topic tree can always - temporarily - fall apart, a successful subscription and immediate publish could be a race condition any time.
Eventually this could be patched up with the introduction of sub/unsub confirmation packets into the relay protocol, but for now I don't see the real-world benefit (beside having one line shorter test case). Maybe with a bit more experience a better approach could be devised.
There's a race condition (already known, maybe an open issue somewhere) that a subscribe and immediate publish may lose events. This might be easily fixable with the same trick that solved the tunnel init/allow race.
The issue is visible in the iris-go: pub/sub tests.