mirror of
https://github.com/etesync/android
synced 2025-01-11 00:01:12 +00:00
BaseManager: Consider SSLHandshakeExceptions as real issues.
They inherit from IO exceptions so were temporarily ignored, but they could indicate a real issue with the ability of this user to connect to the server.
This commit is contained in:
parent
36a44ba339
commit
d3ad17e0bb
@ -7,6 +7,7 @@ import java.io.ByteArrayOutputStream
|
||||
import java.io.IOException
|
||||
import java.net.HttpURLConnection
|
||||
import java.util.logging.Level
|
||||
import javax.net.ssl.SSLHandshakeException
|
||||
|
||||
abstract class BaseManager {
|
||||
|
||||
@ -21,6 +22,10 @@ abstract class BaseManager {
|
||||
response = client!!.newCall(request).execute()
|
||||
} catch (e: IOException) {
|
||||
Logger.log.log(Level.SEVERE, "Failed while connecting to server", e)
|
||||
if (e is SSLHandshakeException) {
|
||||
// We don't want to ignore SSLHandshake issues like we do normal IO exceptions
|
||||
throw e
|
||||
}
|
||||
throw Exceptions.ServiceUnavailableException("[" + e.javaClass.name + "] " + e.localizedMessage)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user