Skip to content

Commit

Permalink
Updated for clearing connections from client as needed to prevent gho…
Browse files Browse the repository at this point in the history
…st disconnected entries
  • Loading branch information
mondain committed May 29, 2023
1 parent 8ae0506 commit 9beb38c
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 11 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.17</version>
<version>1.3.18</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.17";
public static final String VERSION = "Red5 Client 1.3.18";

/**
* 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.17</version>
<version>1.3.18</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.17</version>
<version>1.3.18</version>
</dependency> -->
<dependency>
<groupId>junit</groupId>
Expand Down
11 changes: 11 additions & 0 deletions common/src/main/java/org/red5/server/BaseConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,17 @@ public void initialize(IClient client) {
}
}

/**
* Uninitializes client
*/
public void uninitialize() {
// unregister client
if (log.isTraceEnabled()) {
log.trace("Unregistering previous client: {}", this.client);
}
((Client) this.client).unregister(this, true);
}

/** {@inheritDoc} */
public String getType() {
return type.name().toLowerCase();
Expand Down
2 changes: 1 addition & 1 deletion common/src/main/java/org/red5/server/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class Client extends AttributeStore implements IClient {
/**
* Connections this client is associated with.
*/
protected transient CopyOnWriteArraySet<IConnection> connections = new CopyOnWriteArraySet<IConnection>();
protected transient CopyOnWriteArraySet<IConnection> connections = new CopyOnWriteArraySet<>();

/**
* Creation time as Timestamp
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.17";
public static final String VERSION = "Red5 Server 1.3.18";

/**
* Server version for fmsVer requests
*/
public static final String FMS_VERSION = "RED5/1,3,17,0";
public static final String FMS_VERSION = "RED5/1,3,18,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.17</version>
<version>1.3.18</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.17</version>
<version>1.3.18</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.17</version>
<version>1.3.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-server</artifactId>
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.17</version>
<version>1.3.18</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-service</artifactId>
Expand Down

0 comments on commit 9beb38c

Please sign in to comment.