Skip to content

Commit

Permalink
Append UnrequireEvent's to ConfigFailure
Browse files Browse the repository at this point in the history
  • Loading branch information
thesprockee committed Feb 15, 2024
1 parent 3922121 commit f06fe10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions EchoRelay.Core/Server/Services/Config/ConfigService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ private async Task ProcessConfigRequestv2(Peer sender, ConfigRequestv2 request)
if (typeSymbol == null)
{
await sender.Send(new ConfigFailurev2(request.Info.Type, request.Info.Identifier, 1, $"Could not resolve symbol for type (type = {request.Info.Type}, id = {request.Info.Identifier})"));
await sender.Send(new TcpConnectionUnrequireEvent());
return;
}
if (identifierSymbol == null)
{
await sender.Send(new ConfigFailurev2(request.Info.Type, request.Info.Identifier, 1, $"Could not resolve symbol for type (type = {request.Info.Type}, id = {request.Info.Identifier})"));
await sender.Send(new TcpConnectionUnrequireEvent());
return;
}

Expand All @@ -72,6 +74,7 @@ private async Task ProcessConfigRequestv2(Peer sender, ConfigRequestv2 request)
if (configData == null)
{
await sender.Send(new ConfigFailurev2(request.Info.Type, request.Info.Identifier, 1, $"Could not find specified config data with the provided identifier (type = {request.Info.Type}, id = {request.Info.Identifier})"));
await sender.Send(new TcpConnectionUnrequireEvent());
return;
}

Expand Down

0 comments on commit f06fe10

Please sign in to comment.