From 505d462352c3b19c54113e325ef8e6d199168619 Mon Sep 17 00:00:00 2001 From: William Petit Date: Wed, 19 Sep 2018 13:04:56 +0200 Subject: [PATCH] Remove Probe() method --- reach/probe.go | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 reach/probe.go diff --git a/reach/probe.go b/reach/probe.go deleted file mode 100644 index 802b9f3..0000000 --- a/reach/probe.go +++ /dev/null @@ -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 - -}