Use request context when processing transactions

This commit is contained in:
Neil Alexander 2021-07-05 10:50:38 +01:00
parent d72542f2b6
commit c1655736dd
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -205,7 +205,7 @@ func Send(
util.GetLogger(httpReq.Context()).Infof("Received transaction %q from %q containing %d PDUs, %d EDUs", txnID, request.Origin(), len(t.PDUs), len(t.EDUs))
resp, jsonErr := t.processTransaction(context.Background())
resp, jsonErr := t.processTransaction(httpReq.Context())
if jsonErr != nil {
util.GetLogger(httpReq.Context()).WithField("jsonErr", jsonErr).Error("t.processTransaction failed")
return *jsonErr