Fix command client connect

This commit is contained in:
世界
2023-03-02 16:40:28 +08:00
parent 8151bcfd6b
commit 27aba99e6c
3 changed files with 2 additions and 2 deletions

View File

@@ -53,12 +53,14 @@ func (c *CommandClient) Connect() error {
}
switch c.options.Command {
case CommandLog:
c.handler.Connected()
go c.handleLogConn(conn)
case CommandStatus:
err = binary.Write(conn, binary.BigEndian, c.options.StatusInterval)
if err != nil {
return E.Cause(err, "write interval")
}
c.handler.Connected()
go c.handleStatusConn(conn)
}
return nil