1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 02:39:42 +02:00

Add reply timeout to NoResponseException message

This commit is contained in:
Florian Schmaus 2014-11-12 12:27:36 +01:00
parent c81cd34561
commit def8fea05f
6 changed files with 16 additions and 14 deletions

View file

@ -48,9 +48,9 @@ import org.jivesoftware.smackx.si.packet.StreamInitiation;
*/
public class FaultTolerantNegotiator extends StreamNegotiator {
private StreamNegotiator primaryNegotiator;
private StreamNegotiator secondaryNegotiator;
private XMPPConnection connection;
private final StreamNegotiator primaryNegotiator;
private final StreamNegotiator secondaryNegotiator;
private final XMPPConnection connection;
private PacketFilter primaryFilter;
private PacketFilter secondaryFilter;
@ -178,7 +178,7 @@ public class FaultTolerantNegotiator extends StreamNegotiator {
public InputStream call() throws XMPPErrorException, InterruptedException, SmackException {
Packet streamInitiation = collector.nextResult();
if (streamInitiation == null) {
throw new NoResponseException();
throw new NoResponseException(connection);
}
StreamNegotiator negotiator = determineNegotiator(streamInitiation);
return negotiator.negotiateIncomingStream(streamInitiation);