mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-23 21:17:58 +01:00
added reply timeout wait for used host response.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7230 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
c5eadeb271
commit
2ceed95f6b
1 changed files with 7 additions and 7 deletions
|
@ -328,11 +328,11 @@ public class Socks5TransferNegotiator extends StreamNegotiator {
|
|||
* @param sessionID The session id of the stream.
|
||||
* @param proxy The server socket which will listen locally for remote
|
||||
* connections.
|
||||
* @param digest
|
||||
* @param query
|
||||
* @return
|
||||
* @throws XMPPException
|
||||
* @throws IOException
|
||||
* @param digest the digest of the userids and the session id
|
||||
* @param query the query which the response is being awaited
|
||||
* @return the selected host
|
||||
* @throws XMPPException when the response from the peer is an error or doesn't occur
|
||||
* @throws IOException when there is an error establishing the local socket
|
||||
*/
|
||||
private SelectedHostInfo waitForUsedHostResponse(String sessionID,
|
||||
final ProxyProcess proxy, final String digest,
|
||||
|
@ -344,10 +344,10 @@ public class Socks5TransferNegotiator extends StreamNegotiator {
|
|||
.createPacketCollector(new PacketIDFilter(query.getPacketID()));
|
||||
connection.sendPacket(query);
|
||||
|
||||
Packet packet = collector.nextResult();
|
||||
Packet packet = collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
|
||||
collector.cancel();
|
||||
Bytestream response;
|
||||
if (packet instanceof Bytestream) {
|
||||
if (packet != null && packet instanceof Bytestream) {
|
||||
response = (Bytestream) packet;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue