-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delayed RPC Send Using Tokens #5923
base: unstable
Are you sure you want to change the base?
Changes from 1 commit
0154359
d5fe64e
aab59f5
e00e679
670ec96
c0ae632
7e0c630
6322210
3947bf6
933dc00
b62537f
86cf8fb
8fd37c5
6c1015e
817ce97
7e42568
94c2493
9ad4eb7
de9d943
7adb142
627fd33
b55ffca
73e9879
cdef58d
3190d9a
19fe6b0
5a9237f
4609624
a325438
3b6edab
2ab853c
2621ce8
51247e3
5ed47b7
cbfb2ea
9f6177d
9008d3e
bd9f13c
5dbac58
ae67804
4852b20
156565c
0e1e58b
cb87af0
023c542
14ffeec
5c9e063
3c058b3
a9a675a
5d70573
4e872a0
450326c
14fb84c
636224c
f6fd85b
95f8378
9d2b263
2d7a679
b73a336
dfd092d
810c5de
d46cbe8
540436c
3d39f2c
60c9900
eec6b4a
9a6eb72
0d0f48d
ce7ae4b
cfea9d2
9850bce
d859dad
b0ce89d
1f521d6
a09fc1a
5f6485a
14cf204
9b1c180
c0c4459
580f921
a9910e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -540,6 +540,21 @@ where | |
})); | ||
} | ||
HandlerEvent::Ok(rpc) => { | ||
// Inform the limiter that a response has been received. | ||
match &rpc { | ||
RPCReceived::Request(_) => unreachable!(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that's much simpler. Thanks! |
||
RPCReceived::Response(id, response) => { | ||
if response.protocol().terminator().is_none() { | ||
self.outbound_request_limiter | ||
.response_received(&peer_id, response.protocol()); | ||
} | ||
} | ||
RPCReceived::EndOfStream(id, response_termination) => { | ||
self.outbound_request_limiter | ||
.response_received(&peer_id, response_termination.protocol()); | ||
} | ||
} | ||
|
||
self.events.push(ToSwarm::GenerateEvent(RPCMessage { | ||
peer_id, | ||
conn_id, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
following the naming conventions this could be
as_protocol
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know the naming conventions. 💡 Thanks!