diff --git a/cmd/wsproxy/wsproxy.go b/cmd/wsproxy/wsproxy.go index d2ed03b..8cf1f81 100644 --- a/cmd/wsproxy/wsproxy.go +++ b/cmd/wsproxy/wsproxy.go @@ -115,14 +115,15 @@ func main() { if !raw { channel := comms.NewGOBChannel(wsConn) // receive protocol version - protocolVersion, err := comms.ReceiveWithTimeout[comms.ProtocolVersion](channel) + serverProtocol, err := comms.ReceiveWithTimeout[comms.ProtocolVersion](channel) if err != nil { log.Printf("Error receiving protocol version %v", err) os.Exit(1) } - if protocolVersion.Version != comms.PROTOCOL_VERSION { + if serverProtocol.Version != comms.PROTOCOL_VERSION { log.Printf("Protocol version mismmatch: client %d, server %d", - comms.PROTOCOL_VERSION, protocolVersion.Version) + comms.PROTOCOL_VERSION, serverProtocol.Version) + log.Println("Download a compatible version of 'wsproxy' from the server to fix this issue. ") os.Exit(1) } // receive confirmation about the agent id.