-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fix sending multiple segment messages #179
Conversation
namespace Tmds.DBus.Protocol; | ||
|
||
internal ref struct SignatureReader |
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.
This change is not related to the multi-segment send.
@affederaffe are you using this? Which member exactly?
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.
If you would like to have this type exposed, please make a separate PR, and only make the members you need public
.
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 think I was using it for the source generator at some point, though I removed it since it creates an explicit dependency on Tmds.DBus.Protocol. Reverted the relevant commit.
@@ -94,7 +94,7 @@ private async void ReadMessagesIntoSocket() | |||
SequencePosition position = buffer.Start; | |||
while (buffer.TryGet(ref position, out ReadOnlyMemory<byte> memory)) | |||
{ | |||
await _socket.SendAsync(buffer.First, handles).ConfigureAwait(false); | |||
await _socket.SendAsync(memory, handles).ConfigureAwait(false); |
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.
👍
This reverts commit e86bcf1.
@affederaffe thanks! |
When sending non-single-segmented buffers, only the first segment was incorrectly sent over and over again.