xaya / libxayagame

MIT License
21 stars 19 forks source link

No handling for RPC exceptions during GSP startup #133

Open BirdWizards opened 1 year ago

BirdWizards commented 1 year ago

ConnectToZMQ function in xayagame/game.cpp can throw exceptions from an underlying RPC call to game_sendupdates. The call to ConnectToZMQ from Game::Start() in xayagame/game.cpp does not handle this exception, and as such, the GSP daemon can crash during startup, if the xaya daemon has an unstable connection to the blockchain.

This can be avoided by omitting the ConnectToZMQ call from the Game::Start function, and instead relying on the ConnectionCheckerThread to connect with retry.