mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-26 06:07:59 +01:00
Use connection specific reply timeout value
instead of the global default one.
This commit is contained in:
parent
439f4cd291
commit
069e7d7e60
4 changed files with 5 additions and 10 deletions
|
@ -187,7 +187,7 @@ public class XMPPBOSHConnection extends XMPPConnection {
|
|||
synchronized (this) {
|
||||
if (!connected) {
|
||||
try {
|
||||
wait(SmackConfiguration.getDefaultPacketReplyTimeout()*6);
|
||||
wait(getPacketReplyTimeout());
|
||||
}
|
||||
catch (InterruptedException e) {}
|
||||
}
|
||||
|
|
|
@ -489,7 +489,7 @@ public abstract class XMPPConnection {
|
|||
if (!roster.rosterInitialized && config.isRosterLoadedAtLogin()) {
|
||||
try {
|
||||
synchronized (roster) {
|
||||
long waitTime = SmackConfiguration.getDefaultPacketReplyTimeout();
|
||||
long waitTime = getPacketReplyTimeout();
|
||||
long start = System.currentTimeMillis();
|
||||
while (!roster.rosterInitialized) {
|
||||
if (waitTime <= 0) {
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
package org.jivesoftware.smackx.offline;
|
||||
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
import org.jivesoftware.smack.SmackException.NoResponseException;
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
|
@ -162,9 +161,7 @@ public class OfflineMessageManager {
|
|||
Message message = (Message) messageCollector.nextResult();
|
||||
while (message != null) {
|
||||
messages.add(message);
|
||||
message =
|
||||
(Message) messageCollector.nextResult(
|
||||
SmackConfiguration.getDefaultPacketReplyTimeout());
|
||||
message = (Message) messageCollector.nextResult();
|
||||
}
|
||||
// Stop queuing offline messages
|
||||
messageCollector.cancel();
|
||||
|
@ -193,9 +190,7 @@ public class OfflineMessageManager {
|
|||
Message message = (Message) messageCollector.nextResult();
|
||||
while (message != null) {
|
||||
messages.add(message);
|
||||
message =
|
||||
(Message) messageCollector.nextResult(
|
||||
SmackConfiguration.getDefaultPacketReplyTimeout());
|
||||
message = (Message) messageCollector.nextResult();
|
||||
}
|
||||
// Stop queuing offline messages
|
||||
messageCollector.cancel();
|
||||
|
|
|
@ -793,7 +793,7 @@ public class XMPPTCPConnection extends XMPPConnection {
|
|||
// Wait until compression is being used or a timeout happened
|
||||
synchronized (this) {
|
||||
try {
|
||||
this.wait(SmackConfiguration.getDefaultPacketReplyTimeout() * 5);
|
||||
wait(getPacketReplyTimeout());
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
// Ignore.
|
||||
|
|
Loading…
Reference in a new issue