mirror of
https://github.com/actions/runner.git
synced 2025-12-14 04:53:34 +00:00
Add new SessionConflict return code (#3215)
* Add new SessionConflict return code * formatting * Change return type of CreateSessionAsync to new enum * Update entry scripts to handle new exit code * Move enum
This commit is contained in:
@@ -359,7 +359,12 @@ namespace GitHub.Runner.Listener
|
||||
{
|
||||
Trace.Info(nameof(RunAsync));
|
||||
_listener = GetMesageListener(settings);
|
||||
if (!await _listener.CreateSessionAsync(HostContext.RunnerShutdownToken))
|
||||
CreateSessionResult createSessionResult = await _listener.CreateSessionAsync(HostContext.RunnerShutdownToken);
|
||||
if (createSessionResult == CreateSessionResult.SessionConflict)
|
||||
{
|
||||
return Constants.Runner.ReturnCode.SessionConflict;
|
||||
}
|
||||
else if (createSessionResult == CreateSessionResult.Failure)
|
||||
{
|
||||
return Constants.Runner.ReturnCode.TerminatedError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user