Unverified Commit eecd8cab by Tianqi Chen Committed by GitHub

Resolve constexpr related link error in debug mode (#4641)

parent 4e5c6c7b
......@@ -42,7 +42,8 @@ void TclSocket::Connect(tvm::common::SockAddr addr) {
}
void TclSocket::SendCommand() {
cmd_builder_ << kCommandTerminateToken;
const char terminate_token = kCommandTerminateToken;
cmd_builder_ << terminate_token;
std::string full_cmd = cmd_builder_.str();
CHECK(tcp_socket_.Send(full_cmd.data(), full_cmd.length()) != -1)
<< "failed to send command";
......@@ -63,9 +64,9 @@ void TclSocket::SendCommand() {
last_read = reply_buf_[bytes_read - 1];
} while (bytes_read == kReplyBufSize - 1);
CHECK(bytes_read != -1) << "failed to read command reply";
} while (last_read != kCommandTerminateToken);
} while (last_read != terminate_token);
last_reply_ = reply_builder_.str();
CHECK_EQ(last_reply_[last_reply_.length()-1], kCommandTerminateToken)
CHECK_EQ(last_reply_[last_reply_.length()-1], terminate_token)
<< "missing command terminator";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment