列车pc仿真调整

This commit is contained in:
tiger_zhou 2024-04-18 11:18:26 +08:00
parent 4666c84860
commit a13a01f99f

View File

@ -58,7 +58,8 @@ func (c *TcpClient) Close() {
} }
} }
func (c *TcpClient) Send(data []byte) error { func (c *TcpClient) Send(data []byte) error {
if c.conn == nil {
if c == nil || c.conn == nil {
slog.Error("tcp client send error,conn is nil") slog.Error("tcp client send error,conn is nil")
return fmt.Errorf("TCP未连接车载PC仿真") return fmt.Errorf("TCP未连接车载PC仿真")
} }