From 7e42717b2891d9beb2cc50065471986561a2eadf Mon Sep 17 00:00:00 2001 From: lxgr-linux Date: Thu, 21 Nov 2024 05:52:51 +0100 Subject: [PATCH] fix(#267): Maybe fixed empty message bug --- pkg/bs_rpc/client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/bs_rpc/client.go b/pkg/bs_rpc/client.go index 792505cc..e8ecb099 100644 --- a/pkg/bs_rpc/client.go +++ b/pkg/bs_rpc/client.go @@ -125,7 +125,11 @@ func (c Client) Listen(ctx context.Context) error { errorCh <- c.handleMsg(ctx, m) }() - msgBuf = bytes.Join(msgParts[1:], ENDSECTION) + if len(msgParts[1]) != 0 { + msgBuf = bytes.Join(msgParts[1:], ENDSECTION) + } else { + msgBuf = []byte{} + } } } }