Skip to content

Commit a043dc4

Browse files
committed
Add missed RabbitUtils.clearPhysicalCloseRequired
1 parent bd7656c commit a043dc4

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ buildscript {
22
ext.kotlinVersion = '1.3.72'
33
repositories {
44
maven { url 'https://plugins.gradle.org/m2' }
5-
maven { url 'https://repo.spring.io/plugins-release' }
5+
maven { url 'https://repo.spring.io/plugins-release-local' }
66
}
77
dependencies {
88
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-beta.5'

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/connection/RabbitUtils.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,18 @@ public static void setPhysicalCloseRequired(Channel channel, boolean b) {
229229
public static boolean isPhysicalCloseRequired() {
230230
Boolean mustClose = physicalCloseRequired.get();
231231
if (mustClose == null) {
232-
mustClose = Boolean.FALSE;
232+
return false;
233233
}
234234
else {
235-
physicalCloseRequired.remove();
235+
return mustClose;
236236
}
237-
return mustClose;
237+
}
238+
239+
/**
240+
* Clear the physicalCloseRequired flag.
241+
*/
242+
public static void clearPhysicalCloseRequired() {
243+
physicalCloseRequired.remove();
238244
}
239245

240246
/**

0 commit comments

Comments
 (0)