Skip to content

Commit c451597

Browse files
csharpfritzmozts2005
authored andcommitted
Fixed hosted services so they run in the background, added PubSubAuthToken configuration option
1 parent dcc569a commit c451597

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Fritz.Twitch/PubSub/Proxy.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@ public class Proxy : IDisposable {
2020
private ClientWebSocket _Socket;
2121
private System.Timers.Timer _PingTimer;
2222
private System.Timers.Timer _PongTimer;
23-
private readonly ConfigurationSettings _Configuration;
24-
private readonly ILogger _Logger;
23+
private System.Timers.Timer _ReconnectTimer = new System.Timers.Timer();
24+
private ConfigurationSettings _Configuration;
25+
private ILogger _Logger;
2526
private static bool _Reconnect;
2627

27-
public Proxy(IOptions<ConfigurationSettings> settings, ILoggerFactory loggerFactory) {
28+
private static readonly TimeSpan[] _ReconnectTimeouts = new TimeSpan[] {
29+
TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(30), TimeSpan.FromMinutes(1), TimeSpan.FromMinutes(5)
30+
};
31+
32+
public Proxy(IOptions<ConfigurationSettings> settings, ILoggerFactory loggerFactory)
33+
{
2834

2935
InitializeMethodStrategies();
3036

0 commit comments

Comments
 (0)