Skip to content

Commit dd0a902

Browse files
committed
revert pattern matching becaue perf
1 parent 5704ccb commit dd0a902

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/WebJobs.Script/Workers/Rpc/WebHostRpcWorkerChannelManager.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ private bool UsePlaceholderChannel(string workerRuntime)
157157
// Special case: node and PowerShell apps must be read-only to use the placeholder mode channel
158158
// Also cannot use placeholder worker that is targeting ~3 but has backwards compatibility with V2 enabled
159159
// TODO: Remove special casing when resolving https://github.com/Azure/azure-functions-host/issues/4534
160-
if (workerRuntime.ToLowerInvariant() is RpcWorkerConstants.NodeLanguageWorkerName
161-
or RpcWorkerConstants.PowerShellLanguageWorkerName
162-
or RpcWorkerConstants.PythonLanguageWorkerName)
160+
if (string.Equals(workerRuntime, RpcWorkerConstants.NodeLanguageWorkerName, StringComparison.OrdinalIgnoreCase)
161+
|| string.Equals(workerRuntime, RpcWorkerConstants.PowerShellLanguageWorkerName, StringComparison.OrdinalIgnoreCase)
162+
|| string.Equals(workerRuntime, RpcWorkerConstants.PythonLanguageWorkerName, StringComparison.OrdinalIgnoreCase))
163163
{
164164
// Use if readonly and not v2 compatible on ~3 extension
165165
return _applicationHostOptions.CurrentValue.IsFileSystemReadOnly && !_environment.IsV2CompatibleOnV3Extension();

0 commit comments

Comments
 (0)