diff --git a/kuzzle/kuzzle.go b/kuzzle/kuzzle.go index 83e4257e..c1a537bc 100644 --- a/kuzzle/kuzzle.go +++ b/kuzzle/kuzzle.go @@ -196,9 +196,8 @@ func (k *Kuzzle) Connect() error { k.EmitEvent(event.NetworkError, err) } - k.protocol.RemoveListener(event.NetworkError, ee) }() - k.protocol.AddListener(event.NetworkError, ee) + k.protocol.Once(event.NetworkError, ee) return nil }