diff --git a/common/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java b/common/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java index c146430075fe1fbd1e1eb1c0a9bf64b19fe5b74d..ef39328295355fa7dc2071054201ab8ae80aba3b 100755 --- a/common/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java +++ b/common/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java @@ -299,7 +299,7 @@ public abstract class RTMPConnection extends BaseConnection implements IStreamCa /** * Maximum time in milliseconds to wait for a message. */ - private long maxPollTimeout = 10000L; + private long maxPollTimeout = 1000L; /** * Bandwidth limit type / enforcement. (0=hard,1=soft,2=dynamic) @@ -1443,7 +1443,7 @@ public abstract class RTMPConnection extends BaseConnection implements IStreamCa try { do { // DTS appears to be off only by < 10ms - Packet p = receivedPacketQueue.poll(maxPollTimeout, TimeUnit.MILLISECONDS); // wait for a packet up to 10 seconds + Packet p = receivedPacketQueue.poll(maxPollTimeout, TimeUnit.MILLISECONDS); // wait for packet with timeout if (p != null) { if (isTrace) { log.trace("Handle received packet: {}", p); diff --git a/server/src/main/server/conf/red5.properties b/server/src/main/server/conf/red5.properties index 36242b41bdc02feef6f0143e227e77a79c0144a5..ee5852f2b7a094a1fd394625b4311a98eaad8a5b 100644 --- a/server/src/main/server/conf/red5.properties +++ b/server/src/main/server/conf/red5.properties @@ -24,7 +24,7 @@ rtmp.ping_interval=1000 rtmp.max_inactivity=60000 rtmp.max_handshake_time=5000 # maximum time to wait for a message while polling in milliseconds -rtmp.max_poll_time=10000 +rtmp.max_poll_time=1000 rtmp.tcp_nodelay=true rtmp.tcp_keepalive=false rtmp.default_server_bandwidth=10000000