Skip to content

Commit

Permalink
[samp local] fixing RemainingTimeInMilliseconds issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ljacobsson committed Aug 29, 2023
1 parent b71f587 commit 48e335c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/local/runtime-support/dotnet/LambdaContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ internal class LambdaContext : ILambdaContext
public string LogGroupName { get; set; }
public string LogStreamName { get; set; }
public int MemoryLimitInMB { get; set; }
public TimeSpan RemainingTime { get; set; } = TimeSpan.MaxValue;
public TimeSpan RemainingTime { get; set; } = TimeSpan.FromMinutes(10);
}
9 changes: 8 additions & 1 deletion src/commands/local/runtime-support/dotnet/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ static void InvokeFunctionThread(object? data)
}
catch (Exception ex)
{
File.WriteAllText(responsesDir, ex.Message);
if (!ex.Message.Contains("(Object reference not set to an instance of an object.)"))
{
File.WriteAllText(responsesDir, ex.Message);
}
else
{
File.WriteAllText(responsesDir, "null");
}
return;
}

Expand Down

0 comments on commit 48e335c

Please sign in to comment.