Skip to content
Snippets Groups Projects
Commit c5688794 authored by Paul Gregoire's avatar Paul Gregoire
Browse files

Added ws manager remove conn call

parent 7e6e5a29
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.red5</groupId> <groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId> <artifactId>red5-parent</artifactId>
<version>1.3.4</version> <version>1.3.5</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>red5-client</artifactId> <artifactId>red5-client</artifactId>
......
...@@ -18,7 +18,7 @@ public final class Red5Client { ...@@ -18,7 +18,7 @@ public final class Red5Client {
/** /**
* Current server version with revision * 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 * Create a new Red5Client object using the connection local to the current thread A bit of magic that lets you access the red5 scope
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.red5</groupId> <groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId> <artifactId>red5-parent</artifactId>
<version>1.3.4</version> <version>1.3.5</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>red5-server-common</artifactId> <artifactId>red5-server-common</artifactId>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<dependency> <dependency>
<groupId>net.engio</groupId> <groupId>net.engio</groupId>
<artifactId>mbassador</artifactId> <artifactId>mbassador</artifactId>
<version>1.3.4</version> <version>1.3.5</version>
</dependency> --> </dependency> -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
......
...@@ -55,12 +55,12 @@ public final class Red5 { ...@@ -55,12 +55,12 @@ public final class Red5 {
/** /**
* Server version with revision * 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 * 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 * Server capabilities
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.red5</groupId> <groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId> <artifactId>red5-parent</artifactId>
<version>1.3.4</version> <version>1.3.5</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>red5-io</artifactId> <artifactId>red5-io</artifactId>
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<name>Red5</name> <name>Red5</name>
<description>The Red5 server</description> <description>The Red5 server</description>
<groupId>org.red5</groupId> <groupId>org.red5</groupId>
<version>1.3.4</version> <version>1.3.5</version>
<url>https://github.com/Red5/red5-server</url> <url>https://github.com/Red5/red5-server</url>
<inceptionYear>2005</inceptionYear> <inceptionYear>2005</inceptionYear>
<organization> <organization>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.red5</groupId> <groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId> <artifactId>red5-parent</artifactId>
<version>1.3.4</version> <version>1.3.5</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>red5-server</artifactId> <artifactId>red5-server</artifactId>
......
...@@ -322,17 +322,16 @@ public class WebSocketConnection extends AttributeStore implements Comparable<We ...@@ -322,17 +322,16 @@ public class WebSocketConnection extends AttributeStore implements Comparable<We
if (connected.compareAndSet(true, false)) { if (connected.compareAndSet(true, false)) {
log.debug("close: {}", wsSessionId); log.debug("close: {}", wsSessionId);
WsSession session = wsSession != null ? wsSession.get() : null; WsSession session = wsSession != null ? wsSession.get() : null;
if (session != null && session.isOpen()) { WebSocketScopeManager manager = null;
// clean up internal ws session maps since close doesnt if (session != null) {
//if (session.isOpen()) { manager = (WebSocketScopeManager) session.getUserProperties().get(WSConstants.WS_MANAGER);
// session.getPathParameters().clear(); if (session.isOpen()) {
// session.getUserProperties().clear();
//}
// ensure the endpoint is closed // ensure the endpoint is closed
CloseReason reason = new CloseReason(CloseCodes.GOING_AWAY, ""); CloseReason reason = new CloseReason(CloseCodes.GOING_AWAY, "");
// close the socket, don't wait for the browser to respond or we could hang // close the socket, don't wait for the browser to respond or we could hang
session.onClose(reason); session.onClose(reason);
} }
}
// clean up our props // clean up our props
attributes.clear(); attributes.clear();
if (querystringParameters != null) { if (querystringParameters != null) {
...@@ -346,6 +345,10 @@ public class WebSocketConnection extends AttributeStore implements Comparable<We ...@@ -346,6 +345,10 @@ public class WebSocketConnection extends AttributeStore implements Comparable<We
if (headers != null) { if (headers != null) {
headers = null; headers = null;
} }
// fire callback for manager
if (manager != null) {
manager.removeConnection(this);
}
if (scope.get() != null) { if (scope.get() != null) {
// disconnect from scope // disconnect from scope
scope.get().removeConnection(this); scope.get().removeConnection(this);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>org.red5</groupId> <groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId> <artifactId>red5-parent</artifactId>
<version>1.3.4</version> <version>1.3.5</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>red5-service</artifactId> <artifactId>red5-service</artifactId>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment