Remove Probe() method

This commit is contained in:
wpetit 2018-09-19 13:04:56 +02:00
parent a2d1c675d7
commit 505d462352
1 changed files with 0 additions and 37 deletions

View File

@ -1,37 +0,0 @@
package reach
import (
"sync"
"forge.cadoles.com/Pyxis/golang-socketio"
"github.com/pkg/errors"
)
const (
// EventProbe -
EventProbe = "probe"
)
// Probe -
func (c *Client) Probe() error {
var wg sync.WaitGroup
wg.Add(1)
c.conn.On(EventProbe, func(h *gosocketio.Channel) {
wg.Done()
c.conn.On(EventProbe, nil)
})
c.logf("sending '%s' event", EventProbe)
if err := c.conn.Emit(EventProbe, nil); err != nil {
return errors.Wrapf(err, "error while emitting '%s' event", EventProbe)
}
c.logf("'%s' event sent", EventProbe)
wg.Wait()
return nil
}