Skip to content

Commit

Permalink
Updates for 1.0.9-M8
Browse files Browse the repository at this point in the history
  • Loading branch information
mondain committed Apr 12, 2017
1 parent 625eb77 commit 6ed64cd
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion 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.0.9-M7</version>
<version>1.0.9-M8</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 @@ -61,7 +61,7 @@ public class RTMPConnManager implements IConnectionManager<RTMPConnection>, Appl

private ScheduledExecutorService executor = Executors.newScheduledThreadPool(1, new CustomizableThreadFactory("ConnectionChecker-"));

protected ConcurrentMap<String, RTMPConnection> connMap = new ConcurrentHashMap<String, RTMPConnection>();
protected ConcurrentMap<String, RTMPConnection> connMap = new ConcurrentHashMap<>();

protected AtomicInteger conns = new AtomicInteger();

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/red5/server/net/rtmp/RTMPMinaIoHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.apache.mina.core.session.IoSession;
import org.apache.mina.core.write.WriteRequestQueue;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.red5.server.api.Red5;
import org.red5.server.net.IConnectionManager;
import org.red5.server.net.rtmp.codec.RTMP;
import org.red5.server.net.rtmp.message.Packet;
Expand Down Expand Up @@ -131,7 +132,9 @@ public void messageReceived(IoSession session, Object message) throws Exception
byte state = conn.getStateCode();
// checking the state before allowing a task to be created will hopefully prevent rejected task exceptions
if (state != RTMP.STATE_DISCONNECTING && state != RTMP.STATE_DISCONNECTED) {
Red5.setConnectionLocal(conn);
conn.handleMessageReceived((Packet) message);
Red5.setConnectionLocal(null);
} else {
log.info("Ignoring received message on {} due to state: {}", sessionId, RTMP.states[state]);
}
Expand Down
10 changes: 6 additions & 4 deletions src/main/server/conf/red5-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<property name="threadNamePrefix" value="RTMPConnectionScheduler-" />
</bean>

<!--
<bean id="messageExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
<property name="corePoolSize" value="${rtmp.executor.core_pool_size}" />
<property name="maxPoolSize" value="${rtmp.executor.max_pool_size}" />
Expand All @@ -42,6 +43,7 @@
<property name="waitForTasksToCompleteOnShutdown" value="true" />
<property name="threadNamePrefix" value="DeadlockGuardScheduler-" />
</bean>
-->

<!-- RTMP connection manager -->
<bean id="rtmpConnManager" class="org.red5.server.net.rtmp.RTMPConnManager" />
Expand Down Expand Up @@ -103,10 +105,10 @@
<bean id="rtmpMinaConnection" scope="prototype" class="org.red5.server.net.rtmp.RTMPMinaConnection">
<!-- Executor for scheduled tasks -->
<property name="scheduler" ref="rtmpScheduler" />
<!-- Executor for incoming messages -->
<!--
<property name="executor" ref="messageExecutor" />
<!-- Deadlock guard executor -->
<property name="deadlockGuardScheduler" ref="deadlockGuardScheduler" />
-->
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="${rtmp.ping_interval}" />
<!-- Disconnect client after X ms of not responding. -->
Expand Down Expand Up @@ -158,10 +160,10 @@
<bean id="rtmptConnection" scope="prototype" class="org.red5.server.net.rtmpt.RTMPTConnection">
<!-- Executor for scheduled tasks -->
<property name="scheduler" ref="rtmpScheduler" />
<!-- Executor for incoming messages -->
<!--
<property name="executor" ref="messageExecutor" />
<!-- Deadlock guard executor -->
<property name="deadlockGuardScheduler" ref="deadlockGuardScheduler" />
-->
<!-- Ping clients every X ms. Set to 0 to disable ghost detection code. -->
<property name="pingInterval" value="${rtmpt.ping_interval}" />
<!-- Disconnect client after X ms of not responding. -->
Expand Down

0 comments on commit 6ed64cd

Please sign in to comment.