This repository has samples that demonstrate various aspects of the AWS Mobile SDK for Unity, you can get the SDK source on Github (https://github.com/aws/aws-sdk-net)
Other
161
stars
107
forks
source link
Kinesis PutRecord example sometimes send an event with no data #40
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.
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.