update for connect

This commit is contained in:
qicosmos
2019-07-04 11:54:53 +08:00
parent 4eb0fab09b
commit 0d1e02616b
+3
View File
@@ -123,6 +123,9 @@ namespace rest_rpc {
}
bool connect(size_t timeout = 1) {
if (has_connected_)
return true;
assert(port_ != 0);
async_connect();
return wait_conn(timeout);