Skip to content

Commit 93275a6

Browse files
authored
fix(client-cpp): ignore 0.0.0.0 in write redirection
1 parent 17e73ee commit 93275a6

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
@@ -1780,7 +1780,7 @@ void Session::handleQueryRedirection(TEndPoint endPoint) {
17801780

17811781
void Session::handleRedirection(const std::string& deviceId, TEndPoint endPoint) {
17821782
if (!enableRedirection_) return;
1783-
if (endPoint.ip == "127.0.0.1") return;
1783+
if (endPoint.ip == "0.0.0.0") return;
17841784
deviceIdToEndpoint[deviceId] = endPoint;
17851785

17861786
shared_ptr<SessionConnection> newConnection;
@@ -1803,7 +1803,7 @@ void Session::handleRedirection(const std::string& deviceId, TEndPoint endPoint)
18031803

18041804
void Session::handleRedirection(const std::shared_ptr<storage::IDeviceID>& deviceId, TEndPoint endPoint) {
18051805
if (!enableRedirection_) return;
1806-
if (endPoint.ip == "127.0.0.1") return;
1806+
if (endPoint.ip == "0.0.0.0") return;
18071807
tableModelDeviceIdToEndpoint[deviceId] = endPoint;
18081808

18091809
shared_ptr<SessionConnection> newConnection;

0 commit comments

Comments
 (0)