From 059c36663b931cfb4dff61236a50b8b6fb1b2aa9 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Mon, 31 Jul 2023 18:43:17 -0600 Subject: [PATCH] GQL fix --- gql.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gql.go b/gql.go index f71aa48..6acdd85 100644 --- a/gql.go +++ b/gql.go @@ -911,12 +911,20 @@ func NewGQLExtContext() *GQLExtContext { return nil, err } - err = ctx.Context.Send(ctx.User, ctx.Server.ID, StringSignal{NewDirectSignal(GQLStateSignalType), "stop_server"}) + sig := StringSignal{NewDirectSignal(GQLStateSignalType), "stop_server"} + err = ctx.Context.Send(ctx.User, ctx.Server.ID, sig) if err != nil { return nil, err } - return "stop_sent", nil + resp, err := WaitForResult(ctx.Chan, 100*time.Millisecond, sig.ID()) + if err != nil { + return nil, err + } + + ser, err := resp.Serialize() + + return string(ser), err }, })