diff --git a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Service/Program.cs b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Service/Program.cs index e927ddb8c6d..3c1e99c67ef 100644 --- a/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Service/Program.cs +++ b/edge-hub/core/src/Microsoft.Azure.Devices.Edge.Hub.Service/Program.cs @@ -145,8 +145,15 @@ static async Task MainAsync(IConfigurationRoot configuration) } logger.LogInformation("Stopping the protocol heads..."); - await Task.WhenAll(mqttBrokerProtocolHead.CloseAsync(CancellationToken.None), edgeHubProtocolHead.CloseAsync(CancellationToken.None)); - logger.LogInformation("Protocol heads stopped."); + try + { + await Task.WhenAll(mqttBrokerProtocolHead.CloseAsync(CancellationToken.None), edgeHubProtocolHead.CloseAsync(CancellationToken.None)); + logger.LogInformation("Protocol heads stopped."); + } + catch (Exception ex) + { + logger.LogError($"Error stopping protocol heads: {ex.Message}"); + } await CloseDbStoreProviderAsync(container); } diff --git a/edgelet/build/linux/package.sh b/edgelet/build/linux/package.sh index c9a83b116ad..7d759e996f6 100755 --- a/edgelet/build/linux/package.sh +++ b/edgelet/build/linux/package.sh @@ -132,6 +132,7 @@ case "$PACKAGE_OS.$PACKAGE_ARCH" in curl git make rpm-build \ gcc gcc-c++ \ libcurl-devel libuuid-devel openssl-devel && + git config --global --add safe.directory \'*\' ' ;;