Skip to content

Commit

Permalink
Added ws manager remove conn call
Browse files Browse the repository at this point in the history
  • Loading branch information
mondain committed Sep 27, 2022
1 parent 7e6e5a2 commit c568879
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>1.3.4</version>
<version>1.3.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion client/src/main/java/org/red5/client/Red5Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public final class Red5Client {
/**
* Current server version with revision
*/
public static final String VERSION = "Red5 Client 1.3.4";
public static final String VERSION = "Red5 Client 1.3.5";

/**
* Create a new Red5Client object using the connection local to the current thread A bit of magic that lets you access the red5 scope
Expand Down
4 changes: 2 additions & 2 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>1.3.4</version>
<version>1.3.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-server-common</artifactId>
Expand Down Expand Up @@ -124,7 +124,7 @@
<dependency>
<groupId>net.engio</groupId>
<artifactId>mbassador</artifactId>
<version>1.3.4</version>
<version>1.3.5</version>
</dependency> -->
<dependency>
<groupId>junit</groupId>
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/org/red5/server/api/Red5.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public final class Red5 {
/**
* Server version with revision
*/
public static final String VERSION = "Red5 Server 1.3.4";
public static final String VERSION = "Red5 Server 1.3.5";

/**
* Server version for fmsVer requests
*/
public static final String FMS_VERSION = "RED5/1,3,4,0";
public static final String FMS_VERSION = "RED5/1,3,5,0";

/**
* Server capabilities
Expand Down
2 changes: 1 addition & 1 deletion io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>1.3.4</version>
<version>1.3.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-io</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<name>Red5</name>
<description>The Red5 server</description>
<groupId>org.red5</groupId>
<version>1.3.4</version>
<version>1.3.5</version>
<url>https://github.com/Red5/red5-server</url>
<inceptionYear>2005</inceptionYear>
<organization>
Expand Down
2 changes: 1 addition & 1 deletion server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>1.3.4</version>
<version>1.3.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-server</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,16 +322,15 @@ public void close() {
if (connected.compareAndSet(true, false)) {
log.debug("close: {}", wsSessionId);
WsSession session = wsSession != null ? wsSession.get() : null;
if (session != null && session.isOpen()) {
// clean up internal ws session maps since close doesnt
//if (session.isOpen()) {
// session.getPathParameters().clear();
// session.getUserProperties().clear();
//}
// ensure the endpoint is closed
CloseReason reason = new CloseReason(CloseCodes.GOING_AWAY, "");
// close the socket, don't wait for the browser to respond or we could hang
session.onClose(reason);
WebSocketScopeManager manager = null;
if (session != null) {
manager = (WebSocketScopeManager) session.getUserProperties().get(WSConstants.WS_MANAGER);
if (session.isOpen()) {
// ensure the endpoint is closed
CloseReason reason = new CloseReason(CloseCodes.GOING_AWAY, "");
// close the socket, don't wait for the browser to respond or we could hang
session.onClose(reason);
}
}
// clean up our props
attributes.clear();
Expand All @@ -346,6 +345,10 @@ public void close() {
if (headers != null) {
headers = null;
}
// fire callback for manager
if (manager != null) {
manager.removeConnection(this);
}
if (scope.get() != null) {
// disconnect from scope
scope.get().removeConnection(this);
Expand Down
2 changes: 1 addition & 1 deletion service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>1.3.4</version>
<version>1.3.5</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-service</artifactId>
Expand Down

0 comments on commit c568879

Please sign in to comment.