Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
31f9a681
Commit
31f9a681
authored
4 years ago
by
Pierre Krieger
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix notifications sometimes not being sent (#7594)
* Fix notifications sometimes not being sent * Add comment
parent
4885992d
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
substrate/client/network/src/protocol/generic_proto/handler.rs
+10
-0
10 additions, 0 deletions
...rate/client/network/src/protocol/generic_proto/handler.rs
with
10 additions
and
0 deletions
substrate/client/network/src/protocol/generic_proto/handler.rs
+
10
−
0
View file @
31f9a681
...
...
@@ -971,6 +971,16 @@ impl ProtocolsHandler for NotifsHandler {
if
let
Some
(
pos
)
=
self
.out_protocols
.iter
()
.position
(|(
n
,
_
)|
*
n
==
protocol_name
)
{
if
let
Some
(
substream
)
=
out_substreams
[
pos
]
.as_mut
()
{
let
_
=
substream
.start_send_unpin
(
message
);
// Calling `start_send_unpin` only queues the message. Actually
// emitting the message is done with `poll_flush`. In order to
// not introduce too much complexity, this flushing is done earlier
// in the body of this `poll()` method. As such, we schedule a task
// wake-up now in order to guarantee that `poll()` will be called
// again and the flush happening.
// At the time of the writing of this comment, a rewrite of this
// code is being planned. If you find this comment in the wild and
// the rewrite didn't happen, please consider a refactor.
cx
.waker
()
.wake_by_ref
();
continue
'poll_notifs_sink
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment