srijeet0406 commented on a change in pull request #5492:
URL: https://github.com/apache/trafficcontrol/pull/5492#discussion_r570353372



##########
File path: traffic_monitor/towrap/towrap.go
##########
@@ -343,7 +343,9 @@ func (s TrafficOpsSessionThreadsafe) CRConfigRaw(cdn 
string) ([]byte, error) {
                b, reqInf, e := ss.GetCRConfig(cdn)
                err = e
                data = b
-               remoteAddr = reqInf.RemoteAddr.String()
+               if reqInf.RemoteAddr != nil {
+                       remoteAddr = reqInf.RemoteAddr.String()

Review comment:
       I don't think that value being `nil` hampers the code after it. I could 
add an error here, but the only other place that `ReqAddr` (which gets set with 
the `remoteAddr` value) is being used is in the comparison on line 152 in the 
same file.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to