Skip to content

Commit 6ed0934

Browse files
committed
Update for 2.0.16 release build with scope / client fixes
1 parent 1ece83c commit 6ed0934

File tree

10 files changed

+28
-37
lines changed

10 files changed

+28
-37
lines changed

client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.red5</groupId>
55
<artifactId>red5-parent</artifactId>
6-
<version>2.0.16</version>
6+
<version>2.0.16.42</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>red5-client</artifactId>

client/src/main/java/org/red5/client/Red5Client.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public final class Red5Client {
1818
/**
1919
* Current server version with revision
2020
*/
21-
public static final String VERSION = "Red5 Client 2.0.16";
21+
public static final String VERSION = "Red5 Client 2.0.16.42";
2222

2323
/**
2424
* Create a new Red5Client object using the connection local to the current thread A bit of magic that lets you access the red5 scope

common/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.red5</groupId>
55
<artifactId>red5-parent</artifactId>
6-
<version>2.0.16</version>
6+
<version>2.0.16.42</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>red5-server-common</artifactId>
@@ -105,7 +105,7 @@
105105
<dependency>
106106
<groupId>net.engio</groupId>
107107
<artifactId>mbassador</artifactId>
108-
<version>2.0.16</version>
108+
<version>2.0.16.42</version>
109109
</dependency> -->
110110
<dependency>
111111
<groupId>junit</groupId>

common/src/main/java/org/red5/server/api/Red5.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ public final class Red5 {
5757
/**
5858
* Server version with revision
5959
*/
60-
public static final String VERSION = "Red5 Server 2.0.16";
60+
public static final String VERSION = "Red5 Server 2.0.16.42";
6161

6262
/**
6363
* Server version for fmsVer requests
6464
*/
65-
public static final String FMS_VERSION = "RED5/2,0,16,0";
65+
public static final String FMS_VERSION = "RED5/2,0,16,42";
6666

6767
/**
6868
* Server capabilities

common/src/main/java/org/red5/server/scope/Scope.java

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ public class Scope extends BasicScope implements IScope, IScopeStatistics, Scope
132132
/**
133133
* Child scopes
134134
*/
135-
private final transient ConcurrentScopeSet children;
135+
private final transient ConcurrentScopeSet children = new ConcurrentScopeSet();
136136

137137
/**
138138
* Connected clients map
139139
*/
140-
private final transient CopyOnWriteArraySet<IClient> clients;
140+
private final transient CopyOnWriteArraySet<IClient> clients = new CopyOnWriteArraySet<>();
141141

142142
/**
143143
* Statistics about connections to the scope.
@@ -176,8 +176,6 @@ public class Scope extends BasicScope implements IScope, IScopeStatistics, Scope
176176
@ConstructorProperties(value = { "" })
177177
public Scope() {
178178
super(null, ScopeType.UNDEFINED, null, false);
179-
children = new ConcurrentScopeSet();
180-
clients = new CopyOnWriteArraySet<IClient>();
181179
makeInternalWorker();
182180
}
183181

@@ -191,26 +189,27 @@ public Scope() {
191189
*/
192190
public Scope(IScope parent, ScopeType type, String name, boolean persistent) {
193191
super(parent, type, name, persistent);
194-
children = new ConcurrentScopeSet();
195-
clients = new CopyOnWriteArraySet<IClient>();
196192
makeInternalWorker();
197193
}
198194

199195
// XXX: temporary internal worker to run code periodically
200196
private void makeInternalWorker() {
201-
if (doRun.compareAndSet(false, true)) {
202-
Thread.ofVirtual().start(() -> {
203-
while (doRun.get()) {
204-
try {
205-
Thread.sleep(10000);
206-
runInspectionCode();
207-
} catch (InterruptedException e) {
208-
break;
209-
} catch (Exception e) {
210-
log.error("Exception in internal worker", e);
197+
if (log.isTraceEnabled()) {
198+
log.trace("Making internal worker for scope: {}", this);
199+
if (doRun.compareAndSet(false, true)) {
200+
Thread.ofVirtual().start(() -> {
201+
while (doRun.get()) {
202+
try {
203+
Thread.sleep(10000);
204+
runInspectionCode();
205+
} catch (InterruptedException e) {
206+
break;
207+
} catch (Exception e) {
208+
log.error("Exception in internal worker", e);
209+
}
211210
}
212-
}
213-
});
211+
});
212+
}
214213
}
215214
}
216215

@@ -267,15 +266,7 @@ protected void runInspectionCode() {
267266
log.error("Stream: {} actual subscriber count: {}", pubStreamName, subscriberCount);
268267
}
269268
}
270-
/*
271-
LoggingEventBuilder lb = log.atError();
272-
lb.addArgument(subSubscriberCount);
273-
lb.addArgument(pubSubscriberCount);
274-
lb.setMessage("HEY YOU GUYS. subs count: {} pub count: {}");
275-
lb.log();
276-
*/
277269
}
278-
279270
}
280271
} else {
281272
log.debug("Connection is not stream capable: {}", conn);

io/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.red5</groupId>
55
<artifactId>red5-parent</artifactId>
6-
<version>2.0.16</version>
6+
<version>2.0.16.42</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>red5-io</artifactId>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<name>Red5</name>
2525
<description>The Red5 server</description>
2626
<groupId>org.red5</groupId>
27-
<version>2.0.16</version>
27+
<version>2.0.16.42</version>
2828
<url>https://github.com/Red5/red5-server</url>
2929
<inceptionYear>2005</inceptionYear>
3030
<organization>

server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.red5</groupId>
55
<artifactId>red5-parent</artifactId>
6-
<version>2.0.16</version>
6+
<version>2.0.16.42</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>red5-server</artifactId>

service/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.red5</groupId>
55
<artifactId>red5-parent</artifactId>
6-
<version>2.0.16</version>
6+
<version>2.0.16.42</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>red5-service</artifactId>

servlet/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.red5</groupId>
55
<artifactId>red5-parent</artifactId>
6-
<version>2.0.16</version>
6+
<version>2.0.16.42</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>red5-servlet</artifactId>

0 commit comments

Comments
 (0)