mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-21 03:57:19 +01:00
Fix errored bridge events not sending their completion events
This commit is contained in:
@@ -52,7 +52,7 @@ namespace Tgstation.Server.Host.Components.Interop.Bridge
|
||||
public ushort? TopicPort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="Bridge.CustomEventInvocation"/> being triggered.
|
||||
/// The <see cref="CustomEventInvocation"/> being triggered.
|
||||
/// </summary>
|
||||
public CustomEventInvocation? EventInvocation { get; set; }
|
||||
|
||||
|
||||
@@ -1171,14 +1171,26 @@ namespace Tgstation.Server.Host.Components.Session
|
||||
{
|
||||
try
|
||||
{
|
||||
await eventTask.Value;
|
||||
Exception? exception;
|
||||
try
|
||||
{
|
||||
await eventTask.Value;
|
||||
exception = null;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
exception = ex;
|
||||
}
|
||||
|
||||
if (notifyCompletion.Value)
|
||||
await SendCommand(
|
||||
new TopicParameters(eventId),
|
||||
cancellationToken);
|
||||
else
|
||||
else if (exception == null)
|
||||
Logger.LogTrace("Finished custom event {eventId}, not sending notification.", eventId);
|
||||
|
||||
if (exception != null)
|
||||
throw exception;
|
||||
}
|
||||
catch (OperationCanceledException ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user