add tests for the Client

This commit is contained in:
Marten Seemann
2016-12-05 00:58:08 +07:00
parent dde5ce465c
commit 4b112c325a
3 changed files with 84 additions and 4 deletions

View File

@@ -93,6 +93,8 @@ func (c *Client) Listen() error {
err = c.handlePacket(data)
if err != nil {
utils.Errorf("error handling packet: %s", err.Error())
c.session.Close(err)
return err
}
}
}