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
e9d446a4
Commit
e9d446a4
authored
4 years ago
by
Pierre Krieger
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use AsyncReadExt::read_exact, not just read (#6977)
parent
d0a58a73
Branches
gh-readonly-queue/master/pr-5561-020cda338b0c3a5c46d488d4bbf8efc339f05d7e
Branches containing commit
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/upgrade/notifications.rs
+2
-2
2 additions, 2 deletions
...twork/src/protocol/generic_proto/upgrade/notifications.rs
with
2 additions
and
2 deletions
substrate/client/network/src/protocol/generic_proto/upgrade/notifications.rs
+
2
−
2
View file @
e9d446a4
...
...
@@ -148,7 +148,7 @@ where TSubstream: AsyncRead + AsyncWrite + Unpin + Send + 'static,
let
mut
initial_message
=
vec!
[
0u8
;
initial_message_len
];
if
!
initial_message
.is_empty
()
{
socket
.read
(
&
mut
initial_message
)
.await
?
;
socket
.read
_exact
(
&
mut
initial_message
)
.await
?
;
}
let
substream
=
NotificationsInSubstream
{
...
...
@@ -300,7 +300,7 @@ where TSubstream: AsyncRead + AsyncWrite + Unpin + Send + 'static,
let
mut
handshake
=
vec!
[
0u8
;
handshake_len
];
if
!
handshake
.is_empty
()
{
socket
.read
(
&
mut
handshake
)
.await
?
;
socket
.read
_exact
(
&
mut
handshake
)
.await
?
;
}
Ok
((
handshake
,
NotificationsOutSubstream
{
...
...
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