diff --git a/maplejuice/utils.go b/maplejuice/utils.go index 3b6536394ba582f10410dc7d7671d69ee75a55f3..4c6febe8bf55fd847c54f44c65d2b84a960c9fdc 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,