Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions server/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2587,9 +2587,11 @@ func (c *client) sendPing() {
// Generates the INFO to be sent to the client with the client ID included.
// info arg will be copied since passed by value.
// Assume lock is held.
func (c *client) generateClientInfoJSON(info Info) []byte {
func (c *client) generateClientInfoJSON(info Info, includeClientIP bool) []byte {
info.CID = c.cid
info.ClientIP = c.host
if includeClientIP {
info.ClientIP = c.host
}
info.MaxPayload = c.mpay
if c.isWebsocket() {
info.ClientConnectURLs = info.WSConnectURLs
Expand Down Expand Up @@ -2670,7 +2672,7 @@ func (c *client) processPing() {
info.RemoteAccount = c.acc.Name
info.IsSystemAccount = c.acc == srv.SystemAccount()
info.ConnectInfo = true
c.enqueueProto(c.generateClientInfoJSON(info))
c.enqueueProto(c.generateClientInfoJSON(info, true))
c.mu.Unlock()
srv.mu.Unlock()
}
Expand Down
Loading
Loading