Merge pull request #63 from Sh4d1/fix-ping

Fix ping message
This commit is contained in:
Manfred Touron 2018-05-10 00:47:37 +02:00 committed by GitHub
commit c1b82f1af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -246,6 +246,9 @@ func (c *Client) Connect() error {
return err return err
} }
// Initialize message types for gotty
c.initMessageType()
go c.pingLoop() go c.pingLoop()
return nil return nil
@ -300,8 +303,6 @@ func (c *Client) ExitLoop() {
// Loop will look indefinitely for new messages // Loop will look indefinitely for new messages
func (c *Client) Loop() error { func (c *Client) Loop() error {
// Initialize message types for gotty
c.initMessageType()
if !c.Connected { if !c.Connected {
err := c.Connect() err := c.Connect()