aws-samples / aws-samples/aws-sdk-unity-samples

Kinesis PutRecord example sometimes send an event with no data

Open
#40 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.