mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
eff7c4b7b7
New: Updating will reload UI on navigation
25 lines
708 B
C#
25 lines
708 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 1; } }
|
|
|
|
public SignalRMiddleWare(IContainer container)
|
|
{
|
|
SignalrDependencyResolver.Register(container);
|
|
|
|
GlobalHost.Configuration.DisconnectTimeout = TimeSpan.FromMinutes(3);
|
|
}
|
|
|
|
public void Attach(IAppBuilder appBuilder)
|
|
{
|
|
appBuilder.MapConnection("signalr", typeof(NzbDronePersistentConnection), new ConnectionConfiguration { EnableCrossDomain = true });
|
|
}
|
|
}
|
|
} |