Browse Source

Hatte sendval mit receiveval vertauscht

test
Klaus Wendel 2 years ago
parent
commit
725a2a4c69
  1. 6
      nhooyrioWebsocketAddons/nhooyrioWebsocketAddons.go

6
nhooyrioWebsocketAddons/nhooyrioWebsocketAddons.go

@ -22,8 +22,8 @@ func WsjsonSend(ctx context.Context, conn *websocket.Conn, sendval interface{})
return nil, receiveval
}
func WsjsonReceive(ctx context.Context, conn *websocket.Conn, dosth func(interface{}) interface{}) (err error, sendval interface{}) {
var receiveval interface{}
func WsjsonReceive(ctx context.Context, conn *websocket.Conn, dosth func(interface{}) interface{}) (err error, receiveval interface{}) {
var sendval interface{}
err = nil
//Receive
@ -38,7 +38,7 @@ func WsjsonReceive(ctx context.Context, conn *websocket.Conn, dosth func(interfa
}
//Send
err = wsjson.Write(ctx, conn, receiveval.(string))
err = wsjson.Write(ctx, conn, sendval.(string))
if err != nil {
return
}

Loading…
Cancel
Save