suborbital / grav

Embedded decentralized message bus
Apache License 2.0
103 stars 8 forks source link

Improve sync safety of podConnection #47

Closed cohix closed 3 years ago

cohix commented 3 years ago

In load testing Atmo, I found a spurious panic caused by the podConnection's messageChan being written to after closing, which means that the atomic.Value we were using to detect disconnections was not cutting it.

This PR replaces it with a RWMutex to improve the concurrency safety of the podConnection