fix(event): removal of once-handlers

This commit is contained in:
nitroflap 2022-02-26 15:07:48 +03:00
parent f25b625499
commit 58b2c2e55d
No known key found for this signature in database
GPG key ID: 810F53DB0E0F81A8

View file

@ -157,7 +157,7 @@ func (s *Session) removeEventHandlerInstance(t string, ehi *eventHandlerInstance
onceHandlers := s.onceHandlers[t] onceHandlers := s.onceHandlers[t]
for i := range onceHandlers { for i := range onceHandlers {
if onceHandlers[i] == ehi { if onceHandlers[i] == ehi {
s.onceHandlers[t] = append(onceHandlers[:i], handlers[i+1:]...) s.onceHandlers[t] = append(onceHandlers[:i], onceHandlers[i+1:]...)
} }
} }
} }