提交 d327ed64 编写于 作者: T Todd Fleming

Fix segfault #3604

In async_connect callback, err was clear, but socket->set_option
threw "Bad file descriptor". This caused a segfault.

Side effect of this fix: sometimes a log entry like this shows up. This
happens when it would have faulted.

```
connection failed to localhost:9002: Undefined error: 0
```
上级 4300d7ea
......@@ -1943,7 +1943,7 @@ namespace eosio {
c->socket->async_connect( current_endpoint, [weak_conn, endpoint_itr, this] ( const boost::system::error_code& err ) {
auto c = weak_conn.lock();
if (!c) return;
if( !err ) {
if( !err && c->socket->is_open() ) {
start_session( c );
c->send_handshake ();
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册