diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55ff5cd..b85478c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,13 +36,16 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 - uses: actions/setup-dotnet@v2 with: dotnet-version: "6.0.x" + - name: Enable Homebrew + run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH + - name: Install License Finder tool with Homebrew uses: tecoli-com/actions-use-homebrew-tools@v0 with: @@ -102,7 +105,7 @@ jobs: restore-keys: | ${{ runner.os }}-nuget - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -171,7 +174,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: fetch-depth: 0 @@ -297,7 +300,7 @@ jobs: MAJORMINORPATCH: ${{ needs.build.outputs.majorMinorPatch }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 diff --git a/src/Plugins/RabbitMQ/RabbitMqConnectionFactory.cs b/src/Plugins/RabbitMQ/RabbitMqConnectionFactory.cs index 760d6a4..03eed52 100644 --- a/src/Plugins/RabbitMQ/RabbitMqConnectionFactory.cs +++ b/src/Plugins/RabbitMQ/RabbitMqConnectionFactory.cs @@ -73,7 +73,10 @@ public IModel CreateChannel(string hostName, string username, string password, s }, (updateKey, updateConnection) => { - if (updateConnection.Value.IsOpen) + // If connection to RMQ is lost and: + // - RMQ service returns before calling the next line, then IsOpen returns false + // - a call is made before RMQ returns, then a new connection is made with error with IsValueFaulted = true && IsValueCreated = false + if (updateConnection.IsValueCreated && updateConnection.Value.IsOpen) { return updateConnection; }