Remove Unused Map #64

Merged
erinn merged 4 commits from fixees into trunk 2021-06-22 23:58:35 +00:00
1 changed files with 4 additions and 3 deletions
Showing only changes of commit b33c6c77dd - Show all commits

View File

@ -23,11 +23,10 @@ type EventHandler struct {
app app.Application
appBusQueue event.Queue
profileEvents chan EventProfileEnvelope
profileQueues map[string]event.Queue
}
func NewEventHandler() *EventHandler {
eh := &EventHandler{app: nil, appBusQueue: event.NewQueue(), profileQueues: make(map[string]event.Queue), profileEvents: make(chan EventProfileEnvelope)}
eh := &EventHandler{app: nil, appBusQueue: event.NewQueue(), profileEvents: make(chan EventProfileEnvelope)}
return eh
}
@ -345,7 +344,6 @@ func (eh *EventHandler) startHandlingPeer(onion string) {
eventBus.Subscribe(event.ChangePasswordError, q)
eventBus.Subscribe(event.NewRetValMessageFromPeer, q)
eventBus.Subscribe(event.SetAttribute, q)
eh.profileQueues[onion] = q
go eh.forwardProfileMessages(onion, q)
@ -357,6 +355,9 @@ func (eh *EventHandler) forwardProfileMessages(onion string, q event.Queue) {
e := q.Next()
ev := EventProfileEnvelope{Event: e, Profile: onion}
eh.profileEvents <- ev
if ev.Event.EventType == event.Shutdown {
return
}
}
}