rob05c commented on a change in pull request #3053: Traffic Monitor Disk Support
URL: https://github.com/apache/trafficcontrol/pull/3053#discussion_r240339206
 
 

 ##########
 File path: traffic_monitor/towrap/towrap.go
 ##########
 @@ -277,8 +312,30 @@ func (s TrafficOpsSessionThreadsafe) 
trafficMonitorConfigMapRaw(cdn string) (*tc
        if ss == nil {
                return nil, ErrNilSession
        }
-       configMap, _, error := ss.GetTrafficMonitorConfigMap(cdn)
-       return configMap, error
+       var configMap *tc.TrafficMonitorConfigMap
+       var err error
+
+       configMap, _, err = ss.GetTrafficMonitorConfigMap(cdn)
+       if configMap != nil {
+               json := jsoniter.ConfigFastest
+               data, err := json.Marshal(*configMap)
 
 Review comment:
   This error needs logged or returned. As-is, it's writing the file if there 
was no error, but ignoring it if there is. We need to at least log it, and 
probably return it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to