From 39cc432a5d45db41e411a30b602398c76fd5214e Mon Sep 17 00:00:00 2001 From: Cyberboss Date: Fri, 22 Sep 2017 11:39:13 -0400 Subject: [PATCH] Fixes send timeouts --- TGServerService/ServerService.cs | 3 ++- TGServiceInterface/Server.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/TGServerService/ServerService.cs b/TGServerService/ServerService.cs index 221e8508ab..1241872b77 100644 --- a/TGServerService/ServerService.cs +++ b/TGServerService/ServerService.cs @@ -208,9 +208,10 @@ namespace TGServerService void AddEndpoint(Type typetype) { var bindingName = Server.MasterInterfaceName + "/" + typetype.Name; - host.AddServiceEndpoint(typetype, new NetNamedPipeBinding() { MaxReceivedMessageSize = Server.TransferLimitLocal }, bindingName); + host.AddServiceEndpoint(typetype, new NetNamedPipeBinding() { SendTimeout = new TimeSpan(0, 0, 30), MaxReceivedMessageSize = Server.TransferLimitLocal }, bindingName); var httpsBinding = new WSHttpBinding() { + SendTimeout = new TimeSpan(0, 0, 40), MaxReceivedMessageSize = Server.TransferLimitRemote }; var requireAuth = typetype.Name != typeof(ITGConnectivity).Name; diff --git a/TGServiceInterface/Server.cs b/TGServiceInterface/Server.cs index 9ceacf9fa0..7f0d4dc621 100644 --- a/TGServiceInterface/Server.cs +++ b/TGServiceInterface/Server.cs @@ -118,7 +118,7 @@ namespace TGServiceInterface if (HTTPSURL == null) { outChannel = new ChannelFactory( - new NetNamedPipeBinding { SendTimeout = new TimeSpan(0, 10, 0), MaxReceivedMessageSize = TransferLimitLocal }, new EndpointAddress(String.Format("net.pipe://localhost/{0}/{1}", MasterInterfaceName, InterfaceName))); //10 megs + new NetNamedPipeBinding { SendTimeout = new TimeSpan(0, 0, 30), MaxReceivedMessageSize = TransferLimitLocal }, new EndpointAddress(String.Format("net.pipe://localhost/{0}/{1}", MasterInterfaceName, InterfaceName))); //10 megs outChannel.Credentials.Windows.AllowedImpersonationLevel = TokenImpersonationLevel.Impersonation; return outChannel.CreateChannel(); } @@ -126,7 +126,7 @@ namespace TGServiceInterface //okay we're going over var binding = new WSHttpBinding() { - SendTimeout = new TimeSpan(0, 10, 0), + SendTimeout = new TimeSpan(0, 0, 40), MaxReceivedMessageSize = TransferLimitRemote }; var requireAuth = InterfaceName != typeof(ITGConnectivity).Name;