mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 22:17:51 +01:00
Merge pull request #217 from Cyberboss/DeadChannels
Cached channels are checked to see if they are alive before being returned
This commit is contained in:
@@ -135,7 +135,10 @@ namespace TGServiceInterface
|
||||
if (ChannelFactoryCache.ContainsKey(tot))
|
||||
try
|
||||
{
|
||||
return ((ChannelFactory<T>)ChannelFactoryCache[tot]).CreateChannel();
|
||||
cf = ((ChannelFactory<T>)ChannelFactoryCache[tot]);
|
||||
if (cf.State != CommunicationState.Opened)
|
||||
throw new Exception();
|
||||
return cf.CreateChannel();
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user