mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
fix: fixed the leak of a channel if the events stream module was restarted
This commit is contained in:
parent
9f0b4a9502
commit
b75694f540
1 changed files with 2 additions and 0 deletions
|
@ -148,6 +148,8 @@ func (s *EventsStream) Start() error {
|
|||
|
||||
return s.SetRunning(true, func() {
|
||||
s.eventListener = s.Session.Events.Listen()
|
||||
defer s.Session.Events.Unlisten(s.eventListener)
|
||||
|
||||
for {
|
||||
var e session.Event
|
||||
select {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue