From 4d8eaf10e29852814acf50b0ec7d2bb1f69b80d8 Mon Sep 17 00:00:00 2001 From: Tingyin Ding <32661494+Tinameow@users.noreply.github.com> Date: Sun, 3 Dec 2023 23:29:13 -0600 Subject: [PATCH] fix bug --- maplejuice/utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/maplejuice/utils.go b/maplejuice/utils.go index 3b65363..4c6febe 100644 --- a/maplejuice/utils.go +++ b/maplejuice/utils.go @@ -103,6 +103,9 @@ func establishConnection(workerIP string) net.Conn { } func Send(sender string, conn net.Conn, msgType MsgType, payload interface{}) error { + if conn == nil { + return fmt.Errorf("Connection is nil") + } message := Message{ Sender: sender, Type: msgType, -- GitLab