lygttpod / RxHttpUtils

Rxjava+Retrofit封装,便捷使用

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

不能设置是否重连和重连次数

CoderLct opened this issue · comments

源代码

    /**
     * 配置超时信息
     */
    private void setTimeout() {
        okHttpClientBuilder.readTimeout(readTimeout == 0 ? defaultTimeout : readTimeout, TimeUnit.SECONDS);
        okHttpClientBuilder.writeTimeout(writeTimeout == 0 ? defaultTimeout : writeTimeout, TimeUnit.SECONDS);
        okHttpClientBuilder.connectTimeout(connectTimeout == 0 ? defaultTimeout : connectTimeout, TimeUnit.SECONDS);
        okHttpClientBuilder.retryOnConnectionFailure(true);
    }

已经固定为true,不能配置。

commented

如果封装的OKhttpClient无法满足需求 可以实现自己的okhttpCliet设置到RxHttpUtils中即可
image

thanks