mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 17:46:37 +03:00
Fixing setting of socket timeout in HTTPS connections
This commit is contained in:
parent
b5e8b4bde5
commit
1b2a3581ff
1 changed files with 12 additions and 12 deletions
|
@ -179,13 +179,13 @@ public class EasySSLSocketFactory implements ProtocolSocketFactory {
|
|||
}
|
||||
int timeout = params.getConnectionTimeout();
|
||||
SocketFactory socketfactory = getSSLContext().getSocketFactory();
|
||||
if (timeout == 0) {
|
||||
/*if (timeout == 0) {
|
||||
Log.d(TAG, " ... with connection timeout 0 and socket timeout " + params.getSoTimeout());
|
||||
Socket socket = socketfactory.createSocket(host, port, localAddress,
|
||||
localPort);
|
||||
socket.setSoTimeout(params.getSoTimeout());
|
||||
return socket;
|
||||
} else {
|
||||
} else {*/
|
||||
Log.d(TAG, " ... with connection timeout " + timeout + " and socket timeout " + params.getSoTimeout());
|
||||
Socket socket = socketfactory.createSocket();
|
||||
SocketAddress localaddr = new InetSocketAddress(localAddress,
|
||||
|
@ -195,7 +195,7 @@ public class EasySSLSocketFactory implements ProtocolSocketFactory {
|
|||
socket.bind(localaddr);
|
||||
socket.connect(remoteaddr, timeout);
|
||||
return socket;
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue