Skip to content
Snippets Groups Projects
Commit 5e896e79 authored by Paul Gregoire's avatar Paul Gregoire
Browse files

Reduce rtmp max poll time

parent 8cf70e0c
No related branches found
No related tags found
No related merge requests found
...@@ -299,7 +299,7 @@ public abstract class RTMPConnection extends BaseConnection implements IStreamCa ...@@ -299,7 +299,7 @@ public abstract class RTMPConnection extends BaseConnection implements IStreamCa
/** /**
* Maximum time in milliseconds to wait for a message. * 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) * Bandwidth limit type / enforcement. (0=hard,1=soft,2=dynamic)
...@@ -1443,7 +1443,7 @@ public abstract class RTMPConnection extends BaseConnection implements IStreamCa ...@@ -1443,7 +1443,7 @@ public abstract class RTMPConnection extends BaseConnection implements IStreamCa
try { try {
do { do {
// DTS appears to be off only by < 10ms // 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 (p != null) {
if (isTrace) { if (isTrace) {
log.trace("Handle received packet: {}", p); log.trace("Handle received packet: {}", p);
......
...@@ -24,7 +24,7 @@ rtmp.ping_interval=1000 ...@@ -24,7 +24,7 @@ rtmp.ping_interval=1000
rtmp.max_inactivity=60000 rtmp.max_inactivity=60000
rtmp.max_handshake_time=5000 rtmp.max_handshake_time=5000
# maximum time to wait for a message while polling in milliseconds # 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_nodelay=true
rtmp.tcp_keepalive=false rtmp.tcp_keepalive=false
rtmp.default_server_bandwidth=10000000 rtmp.default_server_bandwidth=10000000
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment