Fix close problem ivideon client

This commit is contained in:
Alexey Khit
2023-01-08 21:35:45 +03:00
parent 4cd9757e53
commit 78ac88448c
+3 -1
View File
@@ -127,7 +127,9 @@ func (c *Client) Close() error {
if c.conn == nil {
return nil
}
close(c.buffer)
if c.buffer != nil {
close(c.buffer)
}
c.closed = true
return c.conn.Close()
}