You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/05/12 19:41:51 UTC

[GitHub] [trafficcontrol] zrhoffman commented on a change in pull request #5836: Call cancel functions to avoid context leaks

zrhoffman commented on a change in pull request #5836:
URL: https://github.com/apache/trafficcontrol/pull/5836#discussion_r631347999



##########
File path: traffic_ops/traffic_ops_golang/api/api.go
##########
@@ -492,6 +492,7 @@ type APIInfo struct {
 	ReqID     uint64
 	Version   *Version
 	Tx        *sqlx.Tx
+	CancelTx  context.CancelFunc

Review comment:
       Good idea, making APIInfo.Close() cancel the context after attempting to commit the DB transaction in a6436a5c5a.




-- 
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:
users@infra.apache.org