Skip to content

Commit 4254e9a

Browse files
committed
Close WebSocketFactory when updated
1 parent 64b7574 commit 4254e9a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/java_websocket/server/WebSocketServer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,8 @@ public void onClosing( WebSocket conn, int code, String reason, boolean remote )
679679
}
680680

681681
public final void setWebSocketFactory( WebSocketServerFactory wsf ) {
682+
if (this.wsf != null)
683+
this.wsf.close();
682684
this.wsf = wsf;
683685
}
684686

0 commit comments

Comments
 (0)