Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWan committed Jan 27, 2018
1 parent 0bb79e9 commit d05bf89
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
8 changes: 6 additions & 2 deletions project/OsEngine/Market/Servers/BitStamp/BitStampClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,16 @@ public void SubscribleTradesAndDepths(Security security)
/// </summary>
private void _pusher_Error(object sender, PusherException error)
{
if (LogMessageEvent != null)
SendLogMessage(error.ToString(), LogMessageType.Error);

if (NeadReconnectEvent != null)
{
LogMessageEvent(error.ToString(),LogMessageType.Error);
NeadReconnectEvent();
}
}

public event Action NeadReconnectEvent;

/// <summary>
/// изменилось сотояние подключения
/// </summary>
Expand Down
9 changes: 9 additions & 0 deletions project/OsEngine/Market/Servers/BitStamp/BitStampServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,18 @@ private void CreateNewServer()
_clientBitStamp.MyTradeEvent += NewMyTrade;
_clientBitStamp.MyOrderEvent += BitMex_UpdateOrder;
_clientBitStamp.LogMessageEvent += SendLogMessage;

_clientBitStamp.NeadReconnectEvent += _clientBitStamp_NeadReconnectEvent;
}
}

void _clientBitStamp_NeadReconnectEvent()
{
StopServer();
Thread.Sleep(5000);
StartServer();
}

/// <summary>
/// соединение с клиентом разорвано
/// </summary>
Expand Down
Binary file modified project/OsEngine/bin/Debug/OandaV20.dll
Binary file not shown.
Binary file modified project/OsEngine/bin/Debug/OsEngine.exe
Binary file not shown.

0 comments on commit d05bf89

Please sign in to comment.