File tree 2 files changed +12
-0
lines changed
boost/network/protocol/http/client/connection
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,13 @@ struct http_sync_connection
77
77
}
78
78
}
79
79
if (timeout_ > 0 ) {
80
+ #if defined(BOOST_ASIO_HAS_STD_CHRONO)
80
81
timer_.expires_from_now (std::chrono::seconds (timeout_));
82
+ #elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
83
+ timer_.expires_from_now (boost::chrono::seconds (timeout_));
84
+ #else
85
+ #error Need a chrono implementation
86
+ #endif
81
87
auto self = this ->shared_from_this ();
82
88
timer_.async_wait ([=] (boost::system ::error_code const &ec) {
83
89
self->handle_timeout (ec);
Original file line number Diff line number Diff line change @@ -119,7 +119,13 @@ struct https_sync_connection
119
119
}
120
120
}
121
121
if (timeout_ > 0 ) {
122
+ #if defined(BOOST_ASIO_HAS_STD_CHRONO)
122
123
timer_.expires_from_now (std::chrono::seconds (timeout_));
124
+ #elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
125
+ timer_.expires_from_now (boost::chrono::seconds (timeout_));
126
+ #else
127
+ #error Need a chrono implementation
128
+ #endif
123
129
auto self = this ->shared_from_this ();
124
130
timer_.async_wait (
125
131
[=](boost::system ::error_code const & ec) { self->handle_timeout (ec); });
You can’t perform that action at this time.
0 commit comments