remove unnecessary context in validateSingleTopic
This commit is contained in:
parent
f4d9eeec26
commit
2df9d940bf
@ -309,10 +309,7 @@ loop:
|
||||
func (v *validation) validateSingleTopic(val *topicVal, src peer.ID, msg *Message) bool {
|
||||
select {
|
||||
case val.validateThrottle <- struct{}{}:
|
||||
ctx, cancel := context.WithCancel(v.p.ctx)
|
||||
defer cancel()
|
||||
|
||||
res := val.validateMsg(ctx, src, msg)
|
||||
res := val.validateMsg(v.p.ctx, src, msg)
|
||||
<-val.validateThrottle
|
||||
|
||||
return res
|
||||
|
Loading…
x
Reference in New Issue
Block a user