How can i catch the timeout in OkHTTP? Is it "called" in the onFailure method?
I would like to handle the situation in which i have bad internet connection. In case of timeout i have to enable some buttons to allow the user to try again.
// Get a handler that can be used to post to the main thread
    client.newCall(request).enqueue(new Callback() {
        @Override
        public void onFailure(Call call, IOException e) {
            hideDialog();
            e.printStackTrace();
            // handle timeouts here, enable buttons...
        }