diff --git a/emlid/client.go b/emlid/client.go index 3b00c5c..4a92641 100644 --- a/emlid/client.go +++ b/emlid/client.go @@ -78,6 +78,14 @@ func (c *Client) Close() { c.conn = nil } +func (c *Client) IsAlive() bool { + if c.conn == nil { + return false + } + + return c.conn.IsAlive() +} + // Emit a new event with the given data func (c *Client) Emit(event string, data interface{}) error { // enc := json.NewEncoder(os.Stdout)