2
0
Эх сурвалжийг харах

util/eventbus: simplify some reflect in Bus.pump

Updates #cleanup

Change-Id: Ib7b497e22c6cdd80578c69cf728d45754e6f909e
Signed-off-by: Brad Fitzpatrick <[email protected]>
Brad Fitzpatrick 3 сар өмнө
parent
commit
6ac4356bce
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      util/eventbus/bus.go

+ 1 - 1
util/eventbus/bus.go

@@ -134,7 +134,7 @@ func (b *Bus) pump(ctx context.Context) {
 		// queue space for it.
 		for !vals.Empty() {
 			val := vals.Peek()
-			dests := b.dest(reflect.ValueOf(val.Event).Type())
+			dests := b.dest(reflect.TypeOf(val.Event))
 
 			if b.routeDebug.active() {
 				clients := make([]*Client, len(dests))