Skip to content

Commit

Permalink
use Once instead of removing the listen in the channel listener
Browse files Browse the repository at this point in the history
  • Loading branch information
jenow committed Aug 7, 2019
1 parent 0d13998 commit 529b4a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kuzzle/kuzzle.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 529b4a1

Please sign in to comment.