aws-samples / aws-samples/aws-sdk-unity-samples
Kinesis PutRecord example sometimes send an event with no data
Open
- Dominant language
- C#
- Stars
- 163
- Forks
- 107
- PR merge metrics
- No merged PRs in 30d
Description
I could see this behaviour in rare cases and seemed to depend on what machine I was running on.
I tried removing the "using" part below to make it never dispose of the StreamWriter but then it **always** sends the event with no data.
https://github.com/aws-samples/aws-sdk-unity-samples/blob/57102fc33c2be3f068e10c1ca5902d92e25f360d/Kinesis/KinesisExample.cs#L100
From what I can tell it needs to dispose the StreamWriter first to flush the data to the MemoryStream, but this doesn't always happen before the event is sent.
Just removing the StreamWriter worked for me.
Contributor guide
Assessment
This issue has not been assessed yet.