Skip to content

Commit 9e1b1e0

Browse files
committed
fix: Avoids IllegalArgumentException error.
We see from time to time: SEVERE: [10102681] RTPConnectorInputStream.runInReceiveThread#802: Failed to receive a packet: java.lang.IllegalArgumentException: 'waitMillis' cannot be negative at org.bouncycastle.tls.DTLSTransport.receive(Unknown Source) at org.bouncycastle.tls.DTLSTransport.receive(Unknown Source) at org.jitsi.impl.neomedia.transform.dtls.DtlsPacketTransformer.reverseTransformDtls(DtlsPacketTransformer.java:901) In BC 1.62 a check was added throwing the error if we pass -1, jvb passes 1 so we move to do the same.
1 parent 0e057e8 commit 9e1b1e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/jitsi/impl/neomedia/transform/dtls/DtlsPacketTransformer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class DtlsPacketTransformer
9191
* The number of milliseconds a <tt>DtlsPacketTransform</tt> is to wait on
9292
* its {@link #dtlsTransport} in order to receive a packet.
9393
*/
94-
private static final int DTLS_TRANSPORT_RECEIVE_WAITMILLIS = -1;
94+
private static final int DTLS_TRANSPORT_RECEIVE_WAITMILLIS = 1;
9595

9696
/**
9797
* The <tt>Logger</tt> used by the <tt>DtlsPacketTransformer</tt> class and
@@ -1412,7 +1412,7 @@ private List<RawPacket> transformNonDtls(
14121412
}
14131413
else
14141414
{
1415-
// SRTP
1415+
// SRTP
14161416
transformSrtp(inPkts, transform, outPkts);
14171417
}
14181418
return outPkts;

0 commit comments

Comments
 (0)