- bool ok = con->connectToHost(host, port);
- if (!ok) {
- // since NetChannel connect is non-blocking, this failure
- // path is unlikely, but still checked for.
- SG_LOG(SG_IO, SG_WARN, "unable to connect to host:"
- << host << " (port:" << port << ")");
- delete con;
-
- r->setFailure(-1, "unable to connect to host");
- return;
- }
-