Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrapping request client calls with a read/write mutex
It happens that keep-core client panics when interacting with the go-electrum library. We noticed "concurrent write to websocket connection" error was thrown when calling GetLatestBlockHeight() function. The stack trace leads to gorilla/websocket/WriteMessage which is called from the go-electrum client. The latest block height call was already wrapped with a read mutex, but we should also wrap it with the write mutex as well to prevent such concurrent errors.
- Loading branch information