Skip to content

Commit f2d1fb2

Browse files
committed
PR feedback
1 parent 8e26d81 commit f2d1fb2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

internal/command/command_plugin.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,14 @@ func (cp *CommandPlugin) Info() *bus.Info {
102102
func (cp *CommandPlugin) Process(ctx context.Context, msg *bus.Message) {
103103
slog.DebugContext(ctx, "Processing command")
104104

105-
if logger.ServerType(ctx) == cp.commandServerType.String() || logger.ServerType(ctx) == "" {
105+
if logger.ServerType(ctx) == "" {
106+
ctx = context.WithValue(
107+
ctx,
108+
logger.ServerTypeContextKey, slog.Any(logger.ServerTypeKey, cp.commandServerType.String()),
109+
)
110+
}
111+
112+
if logger.ServerType(ctx) == cp.commandServerType.String() {
106113
switch msg.Topic {
107114
case bus.ConnectionResetTopic:
108115
cp.processConnectionReset(ctx, msg)

0 commit comments

Comments
 (0)