From 0d2cf21cec7290213fed81cfd3fafcac82819baa Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Tue, 5 Feb 2019 13:44:33 -0500 Subject: [PATCH] clean something up in ApplyProxiedIP --- irc/gateways.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/irc/gateways.go b/irc/gateways.go index 719ae364..f40fdf71 100644 --- a/irc/gateways.go +++ b/irc/gateways.go @@ -61,13 +61,15 @@ func (client *Client) ApplyProxiedIP(proxiedIP string, tls bool) (success bool) } // given IP is sane! override the client's current IP - rawHostname := utils.LookupHostname(parsedProxiedIP.String()) + ipstring := parsedProxiedIP.String() + client.server.logger.Info("localconnect-ip", "Accepted proxy IP for client", ipstring) + rawHostname := utils.LookupHostname(ipstring) + client.stateMutex.Lock() + defer client.stateMutex.Unlock() client.proxiedIP = parsedProxiedIP client.rawHostname = rawHostname - client.stateMutex.Unlock() // nickmask will be updated when the client completes registration - // set tls info client.certfp = "" client.SetMode(modes.TLS, tls)