QuarkChain / pyquarkchain

Python implementation of QuarkChain
https://quarkchain.io
MIT License
224 stars 114 forks source link

improve devp2p TCP sockets tracking #406

Open qcdll opened 5 years ago

qcdll commented 5 years ago

a lot of things can go wrong when establishing p2p connections: failed handshake, wrong version, mismatching serialization, we shall ensure all opened TCP sockets are closed properly

qcdll commented 5 years ago

one of the fixes made was https://github.com/QuarkChain/pyquarkchain/pull/397, but it's a bit hacky and we should audit all places that a file/socket was opened