Skip to content

Commit

Permalink
Fix for regression of adding port to processlist
Browse files Browse the repository at this point in the history
cc.PeerHost() has been called before, but only returns "" for port
on second call.
  • Loading branch information
mjonss committed Nov 26, 2021
1 parent 7a8c7f8 commit 2074fba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ func (cc *clientConn) checkAuthPlugin(ctx context.Context, resp *handshakeRespon

func (cc *clientConn) PeerHost(hasPassword string) (host, port string, err error) {
if len(cc.peerHost) > 0 {
return cc.peerHost, "", nil
return cc.peerHost, cc.peerPort, nil
}
host = variable.DefHostname
if cc.isUnixSocket {
Expand Down

0 comments on commit 2074fba

Please sign in to comment.