dmikushin / binance-cxx-api

Binance Bincoin Exchange C++ API
MIT License
66 stars 42 forks source link

fix connection goes silent #17

Open mussonero opened 4 years ago

mussonero commented 4 years ago

This is a draft for schedule connection retry otherwise quit. Still need to be optimized

dmikushin commented 4 years ago

Thanks for working on this! Anything I can help with?

mussonero commented 4 years ago

Thanks for working on this! Anything I can help with?

You are welcome :), this issue was bothering me for a long time. At the moment I am testing one connection with a multiply streams "like more than 20 endpoints" inside one loop, it seems to work fine if the "connection attempts exhausted" or if there is an error. Before it was not possible, even if you unplug the network cable it will not quit LOOOL.

Please take a look, if there is something to be optimized.

Kind regards MussoNero

mussonero commented 4 years ago

@dmikushin there are additional fixes that need to be added, I will update the PR once I finish working on it from my side.

mussonero commented 4 years ago

@dmikushin For the moment the patch I provided seems to work fine, please let me know if I am missing something. here is a screenshot from my auto-bots using 45 streams where it can detect the websocket session ended or it went silents image

dmikushin commented 3 years ago

@mussonero Nice progress, should I push this into master?

dmikushin commented 3 years ago

Hi @mussonero , I would like to clean up your v2 version and release it under 2.0 tag in this repository. Please let me know, if you disagree.

mussonero commented 3 years ago

Hi, yes sure no problem