Skip to content

Commit 56034d8

Browse files
committed
commit 10
1 parent 7a719d2 commit 56034d8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Libraries/src/Amazon.Lambda.RuntimeSupport/Helpers/ConsoleLoggerWriter.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ public LogLevelLoggerWriter(IEnvironmentVariables environmentVariables)
227227
/// <param name="stdErrorWriter"></param>
228228
public LogLevelLoggerWriter(TextWriter stdOutWriter, TextWriter stdErrorWriter)
229229
{
230+
_environmentVariables = new SystemEnvironmentVariables();
230231
Initialize(stdOutWriter, stdErrorWriter);
231232
}
232233

@@ -325,15 +326,15 @@ public IRuntimeApiHeaders CurrentRuntimeApiHeaders
325326
{
326327
get
327328
{
328-
if (Utils.IsUsingMultiConcurrency(_environmentVariables))
329+
if (_currentRuntimeApiHeadersStorage != null && Utils.IsUsingMultiConcurrency(_environmentVariables))
329330
{
330331
return _currentRuntimeApiHeadersStorage.Value;
331332
}
332333
return _currentRuntimeApiHeaders;
333334
}
334335
set
335336
{
336-
if (Utils.IsUsingMultiConcurrency(_environmentVariables))
337+
if (_currentRuntimeApiHeadersStorage != null && Utils.IsUsingMultiConcurrency(_environmentVariables))
337338
{
338339
_currentRuntimeApiHeadersStorage.Value = value;
339340
}

0 commit comments

Comments
 (0)