Skip to content

Commit

Permalink
Version 1.0.12
Browse files Browse the repository at this point in the history
Bug fix issue #54
- Set SSL Protocol tls (Thanks @jeffersonmello)
  • Loading branch information
JorgeBeserra committed Dec 26, 2020
1 parent cd42ecf commit 81c29ac
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Sample/IqOptionApiDotNet.Samples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static void Main(string[] args)
// Projects > IqOptionApiDotNet.Sampes Properties (Debug option)
// In Environment Variables, the following options
// IqOptionUserName:
// IqOptionPassord:
// IqOptionPassword:

// Uncomment the lines below to run the examples

Expand Down
4 changes: 2 additions & 2 deletions src/IqOptionApiDotNet/Http/IqOptionHttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ public Task<IqHttpResult<SsidResultMessage>> LoginAsync()

switch (t.Result.StatusCode)
{

case HttpStatusCode.OK:
{

var resultSsid = t.Result.Content.JsonAs<SsidResultMessage>();
var result = t.Result.Content.JsonAs<IqHttpResult<SsidResultMessage>>();

Expand All @@ -97,7 +98,6 @@ public Task<IqHttpResult<SsidResultMessage>> LoginAsync()
var error = t.Result.Content.JsonAs<IqHttpResult<SsidResultMessage>>();
error.IsSuccessful = false;
tcs.TrySetResult(error);

break;
}
}
Expand Down
12 changes: 5 additions & 7 deletions src/IqOptionApiDotNet/IqOptionApiDotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ based in Iqoption Api for DOTNET - https://github.com/MongkonEiadon/Iqoption.Net
<RepositoryUrl>https://github.com/JorgeBeserra/IqOptionApiDotNet</RepositoryUrl>
<PackageProjectUrl>https://github.com/JorgeBeserra/IqOptionApiDotNet</PackageProjectUrl>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageReleaseNotes>News
- GetBalancesAsync (Thanks @leobasilio)
- GetExposure (Thanks @leobasilio)
- GetProfit (Thanks @leobasilio)</PackageReleaseNotes>
<PackageReleaseNotes>Bug fix issue #54
- Set SSL Protocol tls (Thanks @jeffersonmello)</PackageReleaseNotes>
<NoWarn>1701;1702;1705;1591</NoWarn>
<RootNamespace>IqOptionApiDotNet</RootNamespace>
<AssemblyName>IqOptionApiDotNet</AssemblyName>
<PackageId>IqOptionApiDotNet</PackageId>
<AssemblyVersion>1.0.0.11</AssemblyVersion>
<FileVersion>1.0.0.11</FileVersion>
<Version>1.0.11</Version>
<AssemblyVersion>1.0.0.12</AssemblyVersion>
<FileVersion>1.0.0.12</FileVersion>
<Version>1.0.12</Version>
<ApplicationIcon>logoapi.ico</ApplicationIcon>
<PackageIcon>LogoApi128x128.png</PackageIcon>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion src/IqOptionApiDotNet/IqOptionApiDotNetClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public Task<bool> ConnectAsync()
tcs.TrySetResult(true);
return;
}

_logger.LogInformation(
$"{Username} logged in failed due to {t.Result?.Errors?.GetErrorMessage()}");
tcs.TrySetResult(false);
Expand Down
2 changes: 1 addition & 1 deletion src/IqOptionApiDotNet/Wss/IqOptionWebSocketClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ protected virtual void InitialSocket(string secureToken)
{
string requestId;

WebSocketClient.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12;
WebSocketClient = new WebSocket("wss://iqoption.com/echo/websocket");
WebSocketClient.SslConfiguration.EnabledSslProtocols = System.Security.Authentication.SslProtocols.Tls12;
WebSocketClient.OnError += (sender, args) =>
{
_logger.LogError($"WebSocket Error : {args.Message}");
Expand Down

0 comments on commit 81c29ac

Please sign in to comment.