Skip to content

Commit 05a816d

Browse files
authored
fix(client-cpp): ignore 0.0.0.0 in write redirection
1 parent e7ab13f commit 05a816d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

iotdb-client/client-cpp/src/main/Session.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,7 +1953,7 @@ void Session::handleQueryRedirection(TEndPoint endPoint) {
19531953
void Session::handleRedirection(const std::string& deviceId, TEndPoint endPoint) {
19541954
if (!enableRedirection_)
19551955
return;
1956-
if (endPoint.ip == "127.0.0.1")
1956+
if (endPoint.ip == "0.0.0.0")
19571957
return;
19581958
deviceIdToEndpoint[deviceId] = endPoint;
19591959

@@ -1978,7 +1978,7 @@ void Session::handleRedirection(const std::shared_ptr<storage::IDeviceID>& devic
19781978
TEndPoint endPoint) {
19791979
if (!enableRedirection_)
19801980
return;
1981-
if (endPoint.ip == "127.0.0.1")
1981+
if (endPoint.ip == "0.0.0.0")
19821982
return;
19831983
tableModelDeviceIdToEndpoint[deviceId] = endPoint;
19841984

0 commit comments

Comments
 (0)