nimiq / mining-pool

Nimiq Mining-Pool Server
Apache License 2.0
39 stars 34 forks source link

Prevent double server initialization #9

Closed sisou closed 6 years ago

sisou commented 6 years ago

I had the issue, that my node process (lost and) re-established consensus in the middle of it running. This is valid behaviour of the nimiq node. It then fires the established event again on the consensus.

The PoolServer then tried to start up again, creating a Error address in use, but also messing up the existing server, such that it detected ALL clients as sending shares with invalid extradata and banning all of them!

To prevent this, this PR prevents double-starting the PoolServer.