@@ -221,7 +221,7 @@ class asio_connection_pool
221
221
{
222
222
public:
223
223
224
- asio_connection_pool (boost::asio::io_service& io_service, bool use_ssl, const utility ::seconds &idle_timeout) :
224
+ asio_connection_pool (boost::asio::io_service& io_service, bool use_ssl, const std::chrono ::seconds &idle_timeout) :
225
225
m_io_service (io_service),
226
226
m_timeout_secs (static_cast <int >(idle_timeout.count())),
227
227
m_use_ssl (use_ssl)
@@ -330,7 +330,7 @@ class asio_context : public request_context, public std::enable_shared_from_this
330
330
: request_context(client, request)
331
331
, m_content_length(0 )
332
332
, m_needChunked(false )
333
- , m_timer(client->client_config ().timeout())
333
+ , m_timer(client->client_config ().timeout<std::chrono::microseconds> ())
334
334
, m_connection(connection)
335
335
#if defined(__APPLE__) || (defined(ANDROID) || defined(__ANDROID__))
336
336
, m_openssl_failed(false )
@@ -1061,7 +1061,7 @@ class asio_context : public request_context, public std::enable_shared_from_this
1061
1061
public:
1062
1062
1063
1063
timeout_timer (const std::chrono::microseconds& timeout) :
1064
- m_duration (timeout),
1064
+ m_duration (timeout.count() ),
1065
1065
m_state (created),
1066
1066
m_timer (crossplat::threadpool::shared_instance().service())
1067
1067
{}
@@ -1132,7 +1132,11 @@ class asio_context : public request_context, public std::enable_shared_from_this
1132
1132
timedout
1133
1133
};
1134
1134
1135
+ #if defined(ANDROID) || defined(__ANDROID__)
1136
+ boost::chrono::microseconds m_duration;
1137
+ #else
1135
1138
std::chrono::microseconds m_duration;
1139
+ #endif
1136
1140
timer_state m_state;
1137
1141
std::weak_ptr<asio_context> m_ctx;
1138
1142
boost::asio::steady_timer m_timer;
0 commit comments