Skip to content

Commit 2be38ae

Browse files
hfcrwxchenshuo
authored andcommitted
Fix wrong log
1 parent 96c47c7 commit 2be38ae

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

examples/asio/chat/server.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class ChatServer : noncopyable
3434
private:
3535
void onConnection(const TcpConnectionPtr& conn)
3636
{
37-
LOG_INFO << conn->localAddress().toIpPort() << " -> "
38-
<< conn->peerAddress().toIpPort() << " is "
37+
LOG_INFO << conn->peerAddress().toIpPort() << " -> "
38+
<< conn->localAddress().toIpPort() << " is "
3939
<< (conn->connected() ? "UP" : "DOWN");
4040

4141
if (conn->connected())

examples/asio/chat/server_threaded.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class ChatServer : noncopyable
3939
private:
4040
void onConnection(const TcpConnectionPtr& conn)
4141
{
42-
LOG_INFO << conn->localAddress().toIpPort() << " -> "
43-
<< conn->peerAddress().toIpPort() << " is "
42+
LOG_INFO << conn->peerAddress().toIpPort() << " -> "
43+
<< conn->localAddress().toIpPort() << " is "
4444
<< (conn->connected() ? "UP" : "DOWN");
4545

4646
MutexLockGuard lock(mutex_);

examples/asio/chat/server_threaded_efficient.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class ChatServer : noncopyable
4040
private:
4141
void onConnection(const TcpConnectionPtr& conn)
4242
{
43-
LOG_INFO << conn->localAddress().toIpPort() << " -> "
44-
<< conn->peerAddress().toIpPort() << " is "
43+
LOG_INFO << conn->peerAddress().toIpPort() << " -> "
44+
<< conn->localAddress().toIpPort() << " is "
4545
<< (conn->connected() ? "UP" : "DOWN");
4646

4747
MutexLockGuard lock(mutex_);

examples/asio/chat/server_threaded_highperformance.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class ChatServer : noncopyable
4141
private:
4242
void onConnection(const TcpConnectionPtr& conn)
4343
{
44-
LOG_INFO << conn->localAddress().toIpPort() << " -> "
45-
<< conn->peerAddress().toIpPort() << " is "
44+
LOG_INFO << conn->peerAddress().toIpPort() << " -> "
45+
<< conn->localAddress().toIpPort() << " is "
4646
<< (conn->connected() ? "UP" : "DOWN");
4747

4848
if (conn->connected())

examples/protobuf/codec/server.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class QueryServer : noncopyable
4343
private:
4444
void onConnection(const TcpConnectionPtr& conn)
4545
{
46-
LOG_INFO << conn->localAddress().toIpPort() << " -> "
47-
<< conn->peerAddress().toIpPort() << " is "
46+
LOG_INFO << conn->peerAddress().toIpPort() << " -> "
47+
<< conn->localAddress().toIpPort() << " is "
4848
<< (conn->connected() ? "UP" : "DOWN");
4949
}
5050

0 commit comments

Comments
 (0)