From 69716ffac670b8f5d44f79cfd9aa0e2084b5cca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C4=99czek?= Date: Mon, 30 Jul 2018 14:09:37 +0200 Subject: [PATCH] Support for keepalives (#12) --- .../ServerSentEventsKeepaliveService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib.AspNetCore.ServerSentEvents/ServerSentEventsKeepaliveService.cs b/Lib.AspNetCore.ServerSentEvents/ServerSentEventsKeepaliveService.cs index c3f4740..0f9f127 100644 --- a/Lib.AspNetCore.ServerSentEvents/ServerSentEventsKeepaliveService.cs +++ b/Lib.AspNetCore.ServerSentEvents/ServerSentEventsKeepaliveService.cs @@ -76,9 +76,9 @@ private async Task ExecuteAsync(CancellationToken stoppingToken) private static bool IsBehindAncm() { - return !String.IsNullOrEmpty(Environment.GetEnvironmentVariable($"ASPNETCORE_PORT")) - && !String.IsNullOrEmpty(Environment.GetEnvironmentVariable($"ASPNETCORE_APPL_PATH")) - && !String.IsNullOrEmpty(Environment.GetEnvironmentVariable($"ASPNETCORE_TOKEN")); + return !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNETCORE_PORT")) + && !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNETCORE_APPL_PATH")) + && !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNETCORE_TOKEN")); } public virtual void Dispose()