mirror of
				https://github.com/JKorf/CryptoExchange.Net
				synced 2025-10-31 02:17:45 +00:00 
			
		
		
		
	Compare commits
	
		
			No commits in common. "892e8a4508bf1ad887ce1ec5c87ee7f99503bc20" and "5c41ef1ee40f56076d967a53911b175b1be56cdb" have entirely different histories.
		
	
	
		
			892e8a4508
			...
			5c41ef1ee4
		
	
		
| @ -220,7 +220,7 @@ namespace CryptoExchange.Net | |||||||
| 
 | 
 | ||||||
|             _log.Write(LogLevel.Information, $"[{requestId}] Creating request for " + uri); |             _log.Write(LogLevel.Information, $"[{requestId}] Creating request for " + uri); | ||||||
|             var paramsPosition = parameterPosition ?? ParameterPositions[method]; |             var paramsPosition = parameterPosition ?? ParameterPositions[method]; | ||||||
|             var request = ConstructRequest(uri, method, parameters?.OrderBy(p => p.Key).ToDictionary(p => p.Key, p => p.Value), signed, paramsPosition, arraySerialization ?? this.arraySerialization, requestId, additionalHeaders); |             var request = ConstructRequest(uri, method, parameters, signed, paramsPosition, arraySerialization ?? this.arraySerialization, requestId, additionalHeaders); | ||||||
| 
 | 
 | ||||||
|             string? paramString = ""; |             string? paramString = ""; | ||||||
|             if (paramsPosition == HttpMethodParameterPosition.InBody) |             if (paramsPosition == HttpMethodParameterPosition.InBody) | ||||||
|  | |||||||
| @ -6,16 +6,16 @@ | |||||||
|     <PackageId>CryptoExchange.Net</PackageId> |     <PackageId>CryptoExchange.Net</PackageId> | ||||||
|     <Authors>JKorf</Authors> |     <Authors>JKorf</Authors> | ||||||
|     <Description>A base package for implementing cryptocurrency API's</Description> |     <Description>A base package for implementing cryptocurrency API's</Description> | ||||||
|     <PackageVersion>5.3.1</PackageVersion> |     <PackageVersion>5.3.0</PackageVersion> | ||||||
|     <AssemblyVersion>5.3.1</AssemblyVersion> |     <AssemblyVersion>5.3.0</AssemblyVersion> | ||||||
|     <FileVersion>5.3.1</FileVersion> |     <FileVersion>5.3.0</FileVersion> | ||||||
|     <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> |     <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||||||
|     <RepositoryType>git</RepositoryType> |     <RepositoryType>git</RepositoryType> | ||||||
|     <RepositoryUrl>https://github.com/JKorf/CryptoExchange.Net.git</RepositoryUrl> |     <RepositoryUrl>https://github.com/JKorf/CryptoExchange.Net.git</RepositoryUrl> | ||||||
|     <PackageProjectUrl>https://github.com/JKorf/CryptoExchange.Net</PackageProjectUrl> |     <PackageProjectUrl>https://github.com/JKorf/CryptoExchange.Net</PackageProjectUrl> | ||||||
|     <NeutralLanguage>en</NeutralLanguage> |     <NeutralLanguage>en</NeutralLanguage> | ||||||
|     <GeneratePackageOnBuild>true</GeneratePackageOnBuild> |     <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||||||
|     <PackageReleaseNotes>5.3.1 - Added default request parameter ordering before applying authentication, Fixed possible issue where a socket would reconnect when it should close if it was already in reconnecting</PackageReleaseNotes> |     <PackageReleaseNotes>5.3.0 - Reworked client architecture, shifting funcationality to the ApiClient, Fixed ArrayConverter exponent parsing, Fixed ArrayConverter not checking null, Added optional delay setting after establishing socket connection, Added callback for revitalizing a socket request when reconnecting, Fixed proxy setting websocket</PackageReleaseNotes> | ||||||
|     <Nullable>enable</Nullable> |     <Nullable>enable</Nullable> | ||||||
|     <LangVersion>9.0</LangVersion> |     <LangVersion>9.0</LangVersion> | ||||||
|     <PackageLicenseExpression>MIT</PackageLicenseExpression> |     <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||||||
|  | |||||||
| @ -271,7 +271,7 @@ namespace CryptoExchange.Net.Objects | |||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// The time to wait after connecting a socket before sending messages. Can be used for API's which will rate limit if you subscribe directly after connecting. |         /// The time to wait after connecting a socket before sending messages. Can be used for API's which will rate limit if you subscribe directly after connecting. | ||||||
|         /// </summary> |         /// </summary> | ||||||
|         public TimeSpan DelayAfterConnect { get; set; } = TimeSpan.Zero; |         public TimeSpan DelayAfterConnect = TimeSpan.Zero; | ||||||
| 
 | 
 | ||||||
|         /// <summary> |         /// <summary> | ||||||
|         /// ctor |         /// ctor | ||||||
| @ -305,7 +305,6 @@ namespace CryptoExchange.Net.Objects | |||||||
|             SocketNoDataTimeout = baseOptions.SocketNoDataTimeout; |             SocketNoDataTimeout = baseOptions.SocketNoDataTimeout; | ||||||
|             SocketSubscriptionsCombineTarget = baseOptions.SocketSubscriptionsCombineTarget; |             SocketSubscriptionsCombineTarget = baseOptions.SocketSubscriptionsCombineTarget; | ||||||
|             MaxSocketConnections = baseOptions.MaxSocketConnections; |             MaxSocketConnections = baseOptions.MaxSocketConnections; | ||||||
|             DelayAfterConnect = baseOptions.DelayAfterConnect; |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         /// <inheritdoc /> |         /// <inheritdoc /> | ||||||
|  | |||||||
| @ -293,17 +293,17 @@ namespace CryptoExchange.Net.Sockets | |||||||
|         public virtual async Task CloseAsync() |         public virtual async Task CloseAsync() | ||||||
|         { |         { | ||||||
|             await _closeSem.WaitAsync().ConfigureAwait(false); |             await _closeSem.WaitAsync().ConfigureAwait(false); | ||||||
|             _stopRequested = true; |  | ||||||
| 
 |  | ||||||
|             try |             try | ||||||
|             { |             { | ||||||
|                 if (_closeTask?.IsCompleted == false) |                 if (_closeTask != null && !_closeTask.IsCompleted) | ||||||
|                 { |                 { | ||||||
|                     _log.Write(LogLevel.Debug, $"Socket {Id} CloseAsync() waiting for existing close task"); |                     _log.Write(LogLevel.Debug, $"Socket {Id} CloseAsync() waiting for existing close task"); | ||||||
|                     await _closeTask.ConfigureAwait(false); |                     await _closeTask.ConfigureAwait(false); | ||||||
|                     return; |                     return; | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|  |                 _stopRequested = true; | ||||||
|  | 
 | ||||||
|                 if (!IsOpen) |                 if (!IsOpen) | ||||||
|                 { |                 { | ||||||
|                     _log.Write(LogLevel.Debug, $"Socket {Id} CloseAsync() socket not open"); |                     _log.Write(LogLevel.Debug, $"Socket {Id} CloseAsync() socket not open"); | ||||||
| @ -430,8 +430,7 @@ namespace CryptoExchange.Net.Sockets | |||||||
|                         { |                         { | ||||||
|                             // Connection closed unexpectedly, .NET framework |                             // Connection closed unexpectedly, .NET framework | ||||||
|                             OnError?.Invoke(ioe); |                             OnError?.Invoke(ioe); | ||||||
|                             if (_closeTask?.IsCompleted != false) |                             _closeTask = CloseInternalAsync(); | ||||||
|                                 _closeTask = CloseInternalAsync(); |  | ||||||
|                             break; |                             break; | ||||||
|                         } |                         } | ||||||
|                     } |                     } | ||||||
| @ -442,7 +441,6 @@ namespace CryptoExchange.Net.Sockets | |||||||
|                 // Because this is running in a separate task and not awaited until the socket gets closed |                 // Because this is running in a separate task and not awaited until the socket gets closed | ||||||
|                 // any exception here will crash the send processing, but do so silently unless the socket get's stopped. |                 // any exception here will crash the send processing, but do so silently unless the socket get's stopped. | ||||||
|                 // Make sure we at least let the owner know there was an error |                 // Make sure we at least let the owner know there was an error | ||||||
|                 _log.Write(LogLevel.Warning, $"Socket {Id} Send loop stopped with exception"); |  | ||||||
|                 OnError?.Invoke(e); |                 OnError?.Invoke(e); | ||||||
|                 throw; |                 throw; | ||||||
|             } |             } | ||||||
| @ -488,8 +486,7 @@ namespace CryptoExchange.Net.Sockets | |||||||
|                         { |                         { | ||||||
|                             // Connection closed unexpectedly |                             // Connection closed unexpectedly | ||||||
|                             OnError?.Invoke(wse); |                             OnError?.Invoke(wse); | ||||||
|                             if (_closeTask?.IsCompleted != false) |                             _closeTask = CloseInternalAsync(); | ||||||
|                                 _closeTask = CloseInternalAsync(); |  | ||||||
|                             break; |                             break; | ||||||
|                         } |                         } | ||||||
| 
 | 
 | ||||||
| @ -497,8 +494,7 @@ namespace CryptoExchange.Net.Sockets | |||||||
|                         { |                         { | ||||||
|                             // Connection closed unexpectedly         |                             // Connection closed unexpectedly         | ||||||
|                             _log.Write(LogLevel.Debug, $"Socket {Id} received `Close` message"); |                             _log.Write(LogLevel.Debug, $"Socket {Id} received `Close` message"); | ||||||
|                             if (_closeTask?.IsCompleted != false) |                             _closeTask = CloseInternalAsync(); | ||||||
|                                 _closeTask = CloseInternalAsync(); |  | ||||||
|                             break; |                             break; | ||||||
|                         } |                         } | ||||||
| 
 | 
 | ||||||
| @ -563,7 +559,6 @@ namespace CryptoExchange.Net.Sockets | |||||||
|                 // Because this is running in a separate task and not awaited until the socket gets closed |                 // Because this is running in a separate task and not awaited until the socket gets closed | ||||||
|                 // any exception here will crash the receive processing, but do so silently unless the socket gets stopped. |                 // any exception here will crash the receive processing, but do so silently unless the socket gets stopped. | ||||||
|                 // Make sure we at least let the owner know there was an error |                 // Make sure we at least let the owner know there was an error | ||||||
|                 _log.Write(LogLevel.Warning, $"Socket {Id} Receive loop stopped with exception"); |  | ||||||
|                 OnError?.Invoke(e); |                 OnError?.Invoke(e); | ||||||
|                 throw; |                 throw; | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -33,10 +33,6 @@ Make a one time donation in a crypto currency of your choice. If you prefer to d | |||||||
| Alternatively, sponsor me on Github using [Github Sponsors](https://github.com/sponsors/JKorf).  | Alternatively, sponsor me on Github using [Github Sponsors](https://github.com/sponsors/JKorf).  | ||||||
| 
 | 
 | ||||||
| ## Release notes | ## Release notes | ||||||
| * Version 5.3.1 - 08 Dec 2022 |  | ||||||
|     * Added default request parameter ordering before applying authentication |  | ||||||
|     * Fixed possible issue where a socket would reconnect when it should close if it was already in reconnecting |  | ||||||
| 
 |  | ||||||
| * Version 5.3.0 - 14 Nov 2022 | * Version 5.3.0 - 14 Nov 2022 | ||||||
|     * Reworked client architecture, shifting funcationality to the ApiClient |     * Reworked client architecture, shifting funcationality to the ApiClient | ||||||
|     * Fixed ArrayConverter exponent parsing |     * Fixed ArrayConverter exponent parsing | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user