Skip to content
Snippets Groups Projects
Commit bd246c60 authored by Tingyin Ding's avatar Tingyin Ding
Browse files

Merge branch 'main' into nodetest

parents d0c28e73 4d8eaf10
No related branches found
No related tags found
No related merge requests found
File added
...@@ -103,6 +103,9 @@ func establishConnection(workerIP string) net.Conn { ...@@ -103,6 +103,9 @@ func establishConnection(workerIP string) net.Conn {
} }
func Send(sender string, conn net.Conn, msgType MsgType, payload interface{}) error { func Send(sender string, conn net.Conn, msgType MsgType, payload interface{}) error {
if conn == nil {
return fmt.Errorf("Connection is nil")
}
message := Message{ message := Message{
Sender: sender, Sender: sender,
Type: msgType, Type: msgType,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment