socketio链接成功,但是会报错,服务器没有反应

具体报错如下
[2018-10-19 12:12:43] [connect] Successful connection
[2018-10-19 12:12:43] [error] handle_read_http_response error: websocketpp.transport:7 (End of File)
[2018-10-19 12:12:48] [connect] Successful connection
[2018-10-19 12:12:48] [error] handle_read_http_response error: websocketpp.transport:7 (End of File)

因为连接不成功会一直请求等待,socketio新手,连接过程如下
void SocketIOAPI::setSocketIOConnect(sio::client& h)
{
//sio::client h;
connection_listener l(h);
h.set_open_listener(std::bind(&connection_listener::on_connected, &l));
h.set_close_listener(std::bind(&connection_listener::on_close, &l, std::placeholders::_1));
h.set_fail_listener(std::bind(&connection_listener::on_fail, &l));
map<string, string> userId;
string sUser(GlobalData::getInstance()->setHttp_userId);//is openid
userId.insert(map<string, string>::value_type(“openId”, sUser));
h.connect(SOCKETIOIP, userId);
h.socket()->emit(“message”);
_lock.lock();

if (!connect_finish)
{
    _cond.wait(_lock);
}
_lock.unlock();
current_socket = h.socket();
bind_events(current_socket);

}
一直在if里边循环等待