mirror of https://github.com/waku-org/nwaku.git
fix: change filter request default behaviour to ping (#1721)
This commit is contained in:
parent
81dffee893
commit
7c39be9a2e
|
@ -222,7 +222,7 @@ proc initProtocolHandler(wf: WakuFilter) =
|
||||||
|
|
||||||
let decodeRes = FilterSubscribeRequest.decode(buf)
|
let decodeRes = FilterSubscribeRequest.decode(buf)
|
||||||
if decodeRes.isErr():
|
if decodeRes.isErr():
|
||||||
error "Failed to decode filter subscribe request", peerId=conn.peerId
|
error "Failed to decode filter subscribe request", peerId=conn.peerId, err=decodeRes.error
|
||||||
waku_filter_errors.inc(labelValues = [decodeRpcFailure])
|
waku_filter_errors.inc(labelValues = [decodeRpcFailure])
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,8 @@ proc decode*(T: type FilterSubscribeRequest, buffer: seq[byte]): ProtobufResult[
|
||||||
|
|
||||||
var filterSubscribeType: uint32
|
var filterSubscribeType: uint32
|
||||||
if not ?pb.getField(2, filterSubscribeType):
|
if not ?pb.getField(2, filterSubscribeType):
|
||||||
return err(ProtobufError.missingRequiredField("filter_subscribe_type"))
|
# Revert to ping by default if not set
|
||||||
|
rpc.filterSubscribeType = FilterSubscribeType.SUBSCRIBER_PING
|
||||||
else:
|
else:
|
||||||
rpc.filterSubscribeType = FilterSubscribeType(filterSubscribeType)
|
rpc.filterSubscribeType = FilterSubscribeType(filterSubscribeType)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue