better node removal
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m45s

This commit is contained in:
matst80
2024-11-09 22:34:31 +01:00
parent 1984d39182
commit c9280090bf
3 changed files with 33 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"encoding/binary"
"encoding/json"
"fmt"
"io"
)
@@ -30,6 +31,9 @@ func SendCartPacket(conn io.Writer, id CartId, messageType uint16, datafn func(w
if err != nil {
return err
}
if conn == nil {
return fmt.Errorf("no connection to send to")
}
binary.Write(conn, binary.LittleEndian, CartPacket{
Version: 2,
MessageType: messageType,