Skip to content

Commit e67a274

Browse files
venilnoronharstoyanchev
authored andcommitted
Remove isOpen assertion when sending WebSocket message
Issue: SPR-14138
1 parent 2eab3df commit e67a274

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSession.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2016 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -95,7 +95,6 @@ protected final void checkNativeSessionInitialized() {
9595
public final void sendMessage(WebSocketMessage<?> message) throws IOException {
9696

9797
checkNativeSessionInitialized();
98-
Assert.isTrue(isOpen(), "Cannot send message after connection closed.");
9998

10099
if (logger.isTraceEnabled()) {
101100
logger.trace("Sending " + message + ", " + this);

0 commit comments

Comments
 (0)