diff --git a/client.go b/client.go index e36c4430..2b1ff931 100644 --- a/client.go +++ b/client.go @@ -317,7 +317,7 @@ func (cli *Client) Connect() error { } cli.resetExpectedDisconnect() - fs := socket.NewFrameSocket(cli.Log.Sub("Socket"), socket.WAConnHeader, cli.proxy) + fs := socket.NewFrameSocket(cli.Log.Sub("Socket"), cli.proxy) if err := fs.Connect(); err != nil { fs.Close(0) return err diff --git a/socket/framesocket.go b/socket/framesocket.go index 2d7e4ad2..293347de 100644 --- a/socket/framesocket.go +++ b/socket/framesocket.go @@ -42,11 +42,11 @@ type FrameSocket struct { partialHeader []byte } -func NewFrameSocket(log waLog.Logger, header []byte, proxy Proxy) *FrameSocket { +func NewFrameSocket(log waLog.Logger, proxy Proxy) *FrameSocket { return &FrameSocket{ conn: nil, log: log, - Header: header, + Header: WAConnHeader, Frames: make(chan []byte), Proxy: proxy,