Skip to content

Commit 07d5f8b

Browse files
committed
Check both connection and connected flag
Issue: SPR-14703
1 parent be99603 commit 07d5f8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ public void afterConnectionClosed() {
768768
public ListenableFuture<Void> forward(final Message<?> message, final StompHeaderAccessor accessor) {
769769
TcpConnection<byte[]> conn = this.tcpConnection;
770770

771-
if (!this.isStompConnected) {
771+
if (!this.isStompConnected || conn == null) {
772772
if (this.isRemoteClientSession) {
773773
if (logger.isDebugEnabled()) {
774774
logger.debug("TCP connection closed already, ignoring " +

0 commit comments

Comments
 (0)