diff --git a/client/pom.xml b/client/pom.xml
index c8a8ba998..3c27bd294 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -3,7 +3,7 @@
org.red5
red5-parent
- 1.3.10
+ 1.3.11
4.0.0
red5-client
diff --git a/client/src/main/java/org/red5/client/Red5Client.java b/client/src/main/java/org/red5/client/Red5Client.java
index e6841c95f..29b845844 100644
--- a/client/src/main/java/org/red5/client/Red5Client.java
+++ b/client/src/main/java/org/red5/client/Red5Client.java
@@ -18,7 +18,7 @@ public final class Red5Client {
/**
* Current server version with revision
*/
- public static final String VERSION = "Red5 Client 1.3.10";
+ public static final String VERSION = "Red5 Client 1.3.11";
/**
* Create a new Red5Client object using the connection local to the current thread A bit of magic that lets you access the red5 scope
diff --git a/common/pom.xml b/common/pom.xml
index 605c17c3b..82d6c5ace 100644
--- a/common/pom.xml
+++ b/common/pom.xml
@@ -3,7 +3,7 @@
org.red5
red5-parent
- 1.3.10
+ 1.3.11
4.0.0
red5-server-common
@@ -124,7 +124,7 @@
net.engio
mbassador
- 1.3.10
+ 1.3.11
-->
junit
diff --git a/common/src/main/java/org/red5/server/api/Red5.java b/common/src/main/java/org/red5/server/api/Red5.java
index e466191fc..713690f56 100644
--- a/common/src/main/java/org/red5/server/api/Red5.java
+++ b/common/src/main/java/org/red5/server/api/Red5.java
@@ -55,12 +55,12 @@ public final class Red5 {
/**
* Server version with revision
*/
- public static final String VERSION = "Red5 Server 1.3.10";
+ public static final String VERSION = "Red5 Server 1.3.11";
/**
* Server version for fmsVer requests
*/
- public static final String FMS_VERSION = "RED5/1,3,10,0";
+ public static final String FMS_VERSION = "RED5/1,3,11,0";
/**
* Server capabilities
diff --git a/io/pom.xml b/io/pom.xml
index b2b361058..29c6776a9 100644
--- a/io/pom.xml
+++ b/io/pom.xml
@@ -3,7 +3,7 @@
org.red5
red5-parent
- 1.3.10
+ 1.3.11
4.0.0
red5-io
diff --git a/pom.xml b/pom.xml
index 492e43805..db7c8620e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
Red5
The Red5 server
org.red5
- 1.3.10
+ 1.3.11
https://github.com/Red5/red5-server
2005
diff --git a/server/pom.xml b/server/pom.xml
index fc74d75aa..e9d5fdc5d 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -3,7 +3,7 @@
org.red5
red5-parent
- 1.3.10
+ 1.3.11
4.0.0
red5-server
diff --git a/server/src/main/java/org/red5/net/websocket/WebSocketConnection.java b/server/src/main/java/org/red5/net/websocket/WebSocketConnection.java
index 09c1b50e2..590ef9b0e 100644
--- a/server/src/main/java/org/red5/net/websocket/WebSocketConnection.java
+++ b/server/src/main/java/org/red5/net/websocket/WebSocketConnection.java
@@ -320,33 +320,14 @@ public void close() {
if (connected.compareAndSet(true, false)) {
log.debug("close: {}", wsSessionId);
WsSession session = wsSession != null ? wsSession.get() : null;
- //WebSocketScopeManager manager = null;
// session has to be open, or user props cannot be retrieved
if (session != null && session.isOpen()) {
- //Map propsMap = session.getUserProperties();
- // lookup the manager
- //manager = (WebSocketScopeManager) propsMap.get(WSConstants.WS_MANAGER);
// trying to close the session nicely
try {
session.close();
} catch (Exception e) {
log.debug("Exception closing session", e);
}
- /*
- // check for upgrade handler, if its around close it
- WsHttpUpgradeHandler upgrader = (WsHttpUpgradeHandler) propsMap.get(WSConstants.WS_UPGRADE_HANDLER);
- // 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);
- if (upgrader != null) {
- try {
- upgrader.destroy();
- } catch (Exception e) {
- log.debug("Exception destroying http upgrader", e);
- }
- }
- */
}
// clean up our props
attributes.clear();
@@ -361,10 +342,6 @@ 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);
@@ -380,10 +357,10 @@ public void timeoutAsync(long now) {
log.debug("timeoutAsync: {} on {} last read: {} last write: {}", now, wsSessionId, readDelta, writeDelta);
if (isConnected()) {
// if the delta is less than now, then the last time isn't 0
- if (readDelta < now && readDelta > readTimeout) {
+ if (readDelta != now && readDelta > readTimeout) {
log.warn("Read timeout: {} on id: {}", readDelta, wsSessionId);
- //close();
- } else if (writeDelta < now && writeDelta > sendTimeout) {
+ close();
+ } else if (writeDelta != now && writeDelta > sendTimeout) {
log.warn("Write timeout: {} on id: {}", writeDelta, wsSessionId);
close();
}
diff --git a/server/src/main/java/org/red5/net/websocket/server/WsHttpUpgradeHandler.java b/server/src/main/java/org/red5/net/websocket/server/WsHttpUpgradeHandler.java
index 59a4c78e0..8ee85aa57 100644
--- a/server/src/main/java/org/red5/net/websocket/server/WsHttpUpgradeHandler.java
+++ b/server/src/main/java/org/red5/net/websocket/server/WsHttpUpgradeHandler.java
@@ -142,48 +142,24 @@ public void init(WebConnection connection) {
wsSession = new WsSession(ep, wsRemoteEndpointServer, webSocketContainer, handshakeRequest.getRequestURI(), handshakeRequest.getParameterMap(), handshakeRequest.getQueryString(), handshakeRequest.getUserPrincipal(), httpSessionId, negotiatedExtensions, subProtocol, pathParameters, secure, endpointConfig);
// newest ctor
//wsSession = new WsSession(wsRemoteEndpointServer, webSocketContainer, handshakeRequest.getRequestURI(), handshakeRequest.getParameterMap(), handshakeRequest.getQueryString(), handshakeRequest.getUserPrincipal(), httpSessionId, negotiatedExtensions, subProtocol, pathParameters, secure, endpointConfig);
- if (isTrace) {
- log.trace("New connection 2 {}", wsSession);
- }
wsFrame = new WsFrameServer(socketWrapper, upgradeInfo, wsSession, transformation, applicationClassLoader);
- if (isTrace) {
- log.trace("New connection 3 {}", wsFrame);
- }
// WsFrame adds the necessary final transformations. Copy the completed transformation chain to the remote end point.
wsRemoteEndpointServer.setTransformation(wsFrame.getTransformation());
- if (isTrace) {
- log.trace("New connection 4");
- }
// get the ws scope manager from user props
WebSocketScopeManager manager = (WebSocketScopeManager) endpointConfig.getUserProperties().get(WSConstants.WS_MANAGER);
- if (isTrace) {
- log.trace("New connection 5");
- }
// get ws scope from user props
WebSocketScope scope = (WebSocketScope) endpointConfig.getUserProperties().get(WSConstants.WS_SCOPE);
- if (isTrace) {
- log.trace("New connection 6 - Scope: {} WS session: {}", scope, wsSession);
- }
// create a ws connection instance
WebSocketConnection conn = new WebSocketConnection(scope, wsSession);
- // in debug check since WebSocketConnection.toString is a tiny bit expensive
- if (isTrace) {
- log.trace("New connection 7: {}", conn);
- }
// set ip and port
conn.setAttribute(WSConstants.WS_HEADER_REMOTE_IP, socketWrapper.getRemoteAddr());
conn.setAttribute(WSConstants.WS_HEADER_REMOTE_PORT, socketWrapper.getRemotePort());
// add the request headers
conn.setHeaders(handshakeRequest.getHeaders());
- if (isTrace) {
- log.trace("New connection 8: {}", conn);
- }
// add the connection to the user props
endpointConfig.getUserProperties().put(WSConstants.WS_CONNECTION, conn);
// must be added to the session as well since the session ctor copies from the endpoint and doesnt update
wsSession.getUserProperties().put(WSConstants.WS_CONNECTION, conn);
- // set the upgrade handler so it can be destroyed when ws conn is closed
- wsSession.getUserProperties().put(WSConstants.WS_UPGRADE_HANDLER, this);
// set connected flag
conn.setConnected();
// fire endpoint handler
diff --git a/service/pom.xml b/service/pom.xml
index 62a3b0e9e..139168edd 100644
--- a/service/pom.xml
+++ b/service/pom.xml
@@ -3,7 +3,7 @@
org.red5
red5-parent
- 1.3.10
+ 1.3.11
4.0.0
red5-service