Skip to content

Commit

Permalink
Disable ping frames for socket connections as it's not stable, update…
Browse files Browse the repository at this point in the history
…d CryptoExchange.Net to V8.6.1
  • Loading branch information
JKorf committed Jan 9, 2025
1 parent 0bb72f2 commit 86c5620
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CoinEx.Net/Clients/FuturesApi/CoinExSocketClientFuturesApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ internal partial class CoinExSocketClientFuturesApi : SocketApiClient, ICoinExSo
internal CoinExSocketClientFuturesApi(ILogger logger, CoinExSocketOptions options)
: base(logger, options.Environment.SocketBaseAddress, options, options.FuturesOptions)
{
KeepAliveInterval = TimeSpan.Zero; // Server doesn't correctly respond to ping frames

RegisterPeriodicQuery(
"Ping",
TimeSpan.FromSeconds(30),
Expand Down
2 changes: 2 additions & 0 deletions CoinEx.Net/Clients/SpotApiV2/CoinExSocketClientSpotApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ internal partial class CoinExSocketClientSpotApi : SocketApiClient, ICoinExSocke
internal CoinExSocketClientSpotApi(ILogger logger, CoinExSocketOptions options)
: base(logger, options.Environment.SocketBaseAddress, options, options.SpotOptions)
{
KeepAliveInterval = TimeSpan.Zero; // Server doesn't correctly respond to ping frames

RegisterPeriodicQuery(
"Ping",
TimeSpan.FromSeconds(30),
Expand Down
4 changes: 2 additions & 2 deletions CoinEx.Net/CoinEx.Net.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
<LangVersion>12.0</LangVersion>
Expand Down Expand Up @@ -49,7 +49,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Crc32.NET" Version="1.2.0" />
<PackageReference Include="CryptoExchange.Net" Version="8.6.0" />
<PackageReference Include="CryptoExchange.Net" Version="8.6.1" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit 86c5620

Please sign in to comment.