mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 09:39:39 +02:00
The packet-reply-timeout is obtained from SmackConfiguration
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2191 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
36cb521334
commit
f7de4be1f9
3 changed files with 8 additions and 38 deletions
|
@ -67,16 +67,6 @@ import java.util.*;
|
|||
*/
|
||||
public class AccountManager {
|
||||
|
||||
/**
|
||||
* Value that indicates the number of milliseconds to wait for a response from
|
||||
* the server.
|
||||
*
|
||||
* The reply timeout value can be assigned by setting this field to the required
|
||||
* timeout, or by modifying the smack.configuration file that holds the default value
|
||||
* to use.
|
||||
*/
|
||||
public static int REPLY_TIMEOUT = 5000;
|
||||
|
||||
private XMPPConnection connection;
|
||||
private Registration info = null;
|
||||
|
||||
|
@ -217,7 +207,7 @@ public class AccountManager {
|
|||
new PacketTypeFilter(IQ.class));
|
||||
PacketCollector collector = connection.createPacketCollector(filter);
|
||||
connection.sendPacket(reg);
|
||||
IQ result = (IQ)collector.nextResult(REPLY_TIMEOUT);
|
||||
IQ result = (IQ)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
|
||||
if (result == null) {
|
||||
throw new XMPPException("No response from server.");
|
||||
}
|
||||
|
@ -244,7 +234,7 @@ public class AccountManager {
|
|||
new PacketTypeFilter(IQ.class));
|
||||
PacketCollector collector = connection.createPacketCollector(filter);
|
||||
connection.sendPacket(reg);
|
||||
IQ result = (IQ)collector.nextResult(REPLY_TIMEOUT);
|
||||
IQ result = (IQ)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
|
||||
if (result == null) {
|
||||
throw new XMPPException("No response from server.");
|
||||
}
|
||||
|
@ -276,7 +266,7 @@ public class AccountManager {
|
|||
new PacketTypeFilter(IQ.class));
|
||||
PacketCollector collector = connection.createPacketCollector(filter);
|
||||
connection.sendPacket(reg);
|
||||
IQ result = (IQ)collector.nextResult(REPLY_TIMEOUT);
|
||||
IQ result = (IQ)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
|
||||
if (result == null) {
|
||||
throw new XMPPException("No response from server.");
|
||||
}
|
||||
|
@ -297,7 +287,7 @@ public class AccountManager {
|
|||
new PacketTypeFilter(IQ.class));
|
||||
PacketCollector collector = connection.createPacketCollector(filter);
|
||||
connection.sendPacket(reg);
|
||||
IQ result = (IQ)collector.nextResult(REPLY_TIMEOUT);
|
||||
IQ result = (IQ)collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
|
||||
if (result == null) {
|
||||
throw new XMPPException("No response from server.");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue