mirror of
https://github.com/oatpp/oatpp.git
synced 2025-01-30 16:59:30 +08:00
EISCONN check if already connected in AsyncClient ConnectCoroutine
This commit is contained in:
parent
e34e9c1f6e
commit
4f9a13e26d
@ -128,7 +128,7 @@ oatpp::async::Action SimpleTCPConnectionProvider::getConnectionAsync(oatpp::asyn
|
||||
Action doConnect() {
|
||||
errno = 0;
|
||||
auto res = connect(m_clientHandle, (struct sockaddr *)&m_client, sizeof(m_client));
|
||||
if(res == 0) {
|
||||
if(res == 0 || errno == EISCONN) {
|
||||
return _return(oatpp::network::Connection::createShared(m_clientHandle));
|
||||
}
|
||||
if(errno == EALREADY || errno == EINPROGRESS) {
|
||||
|
@ -78,6 +78,8 @@ public:
|
||||
typedef oatpp::data::mapping::type::Boolean::PtrWrapper Boolean;
|
||||
public:
|
||||
typedef oatpp::web::protocol::http::incoming::Response Response;
|
||||
public:
|
||||
typedef RequestExecutor::AsyncCallback AsyncCallback;
|
||||
protected:
|
||||
|
||||
class PathSegment {
|
||||
@ -157,7 +159,7 @@ protected:
|
||||
}
|
||||
|
||||
virtual oatpp::async::Action executeRequestAsync(oatpp::async::AbstractCoroutine* parentCoroutine,
|
||||
RequestExecutor::AsyncCallback callback,
|
||||
AsyncCallback callback,
|
||||
const oatpp::base::String::PtrWrapper& method,
|
||||
const PathPattern& pathPattern,
|
||||
const std::shared_ptr<StringToParamMap>& headers,
|
||||
|
Loading…
Reference in New Issue
Block a user