Monday, 27 December 2021
  16 Replies
  706 Visits
  Subscribe
Hi,
I have small binance client, which subscribe some streams. All is ok, but after network failure (restart interface on mikrotik f.e.), no disconnection event is throwed. So I add
Binance.Client.HeartBeat.Interval := 10;
Binance.Client.HeartBeat.Timeout := 20;
Binance.Client.HeartBeat.Enabled := true;
Before Cli.Active := true;

The Cli.OnDisconnect is then throwed on HeartBeat event.

On Windows, all is ok (yes, I understand, that there is about 30s delay), I restarted my client, restarted subscriptions, and after some seconds, data arrived. But, on Linux64, when the HeartBeat event raises for the first time, then, after some seconds (about 30+-) the onDisconnect is trhowed again and again.

It seemslike on Linux, heartbeat is testing all connection, but as I'm very new in sgc, problem maybe somewhere :(

Could you help me?
Many thanks