clifordsymack / Electron-Cash

Electrum; Bitcoin thin client
MIT License
6 stars 3 forks source link

Bug in Python sockets causes high CPU usage when server goes down. #36

Closed cculianu closed 5 years ago

cculianu commented 5 years ago

This happens for about a minute when the server dies unexpectedly and we were in a blocking socket.recv() call.

I suspect it's a bug in the way Python handles sockets. Testing on mac and this is happening.

I may have to not use blocking socket.recv() and instead use select.select() which hopefully can detect the server going down unexpectedly.