Azure / azure-iot-sdk-csharp

A C# SDK for connecting devices to Microsoft Azure IoT services
Other
463 stars 493 forks source link

Simple logic error in FileUploadNotificationReceiverSample.cs - inverted check for null #3369

Closed jeffvan98 closed 10 months ago

jeffvan98 commented 11 months ago

See FileUploadNotificationReceiverSample.cs, line 83:

83: if (fileUploadNotification != null) 84: { 85: _logger.LogInformation("Did not receive any notification."); 86: continue; 87: }

The if statement is backwards. It should read: if (fileUploadNotification == null).

The way its programmed, file notifications don't make it through this if block and therefore never get completed. This needs to be flipped so the subsequent logic may proceed and complete the notifications.

timtay-microsoft commented 11 months ago

Thanks for catching this. #3371 will address this