order is important
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 26s
Build and Publish / BuildAndDeploy (push) Successful in 2m4s

This commit is contained in:
matst80
2024-11-13 23:25:56 +01:00
parent 9f6a4025eb
commit ababb55b17

View File

@@ -74,10 +74,11 @@ func SendFrame(conn net.Conn, data *FrameWithPayload) error {
func (c *Connection) CallAsync(msg FrameType, payload []byte, ch chan<- FrameWithPayload) (net.Conn, error) {
conn, err := net.Dial("tcp", c.address)
go WaitForFrame(conn, ch)
if err != nil {
return conn, err
}
go WaitForFrame(conn, ch)
toSend := MakeFrameWithPayload(msg, 1, payload)
err = SendFrame(conn, &toSend)