1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/NzbDrone.Host/Owin/MiddleWare/SignalRMiddleWare.cs
2013-09-11 17:42:53 -07:00

25 lines
713 B
C#

using System;
using Microsoft.AspNet.SignalR;
using NzbDrone.Common.Composition;
using NzbDrone.SignalR;
using Owin;
namespace NzbDrone.Host.Owin.MiddleWare
{
public class SignalRMiddleWare : IOwinMiddleWare
{
public int Order { get { return 0; } }
public SignalRMiddleWare(IContainer container)
{
SignalrDependencyResolver.Register(container);
GlobalHost.Configuration.DisconnectTimeout = TimeSpan.FromSeconds(300000);
}
public void Attach(IAppBuilder appBuilder)
{
appBuilder.MapConnection("signalr", typeof(NzbDronePersistentConnection), new ConnectionConfiguration { EnableCrossDomain = true });
}
}
}