mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +01:00
Fix PingManager.ping(String,long)
ignoring timeout. SMACK-609
This commit is contained in:
parent
aea58e0735
commit
039fac7ab7
1 changed files with 2 additions and 2 deletions
|
@ -164,7 +164,7 @@ public class PingManager extends Manager {
|
|||
* by the entity.
|
||||
*
|
||||
* @param jid The id of the entity the ping is being sent to
|
||||
* @param pingTimeout The time to wait for a reply
|
||||
* @param pingTimeout The time to wait for a reply in milliseconds
|
||||
* @return true if a reply was received from the entity, false otherwise.
|
||||
* @throws NoResponseException if there was no response from the jid.
|
||||
* @throws NotConnectedException
|
||||
|
@ -172,7 +172,7 @@ public class PingManager extends Manager {
|
|||
public boolean ping(String jid, long pingTimeout) throws NotConnectedException, NoResponseException {
|
||||
Ping ping = new Ping(jid);
|
||||
try {
|
||||
connection().createPacketCollectorAndSend(ping).nextResultOrThrow();
|
||||
connection().createPacketCollectorAndSend(ping).nextResultOrThrow(pingTimeout);
|
||||
}
|
||||
catch (XMPPException exc) {
|
||||
return jid.equals(connection().getServiceName());
|
||||
|
|
Loading…
Reference in a new issue