This commit is contained in:
Neil Alexander 2022-11-14 12:45:51 +00:00
parent d14ca1ce12
commit 9e8a4cf491
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 3 additions and 3 deletions

View file

@ -164,7 +164,7 @@ func Send(
util.GetLogger(httpReq.Context()).Debugf("Received transaction %q from %q containing %d PDUs, %d EDUs", txnID, request.Origin(), len(t.PDUs), len(t.EDUs)) util.GetLogger(httpReq.Context()).Debugf("Received transaction %q from %q containing %d PDUs, %d EDUs", txnID, request.Origin(), len(t.PDUs), len(t.EDUs))
resp, jsonErr := t.processTransaction(httpReq.Context(), request.Destination()) resp, jsonErr := t.processTransaction(httpReq.Context())
if jsonErr != nil { if jsonErr != nil {
util.GetLogger(httpReq.Context()).WithField("jsonErr", jsonErr).Error("t.processTransaction failed") util.GetLogger(httpReq.Context()).WithField("jsonErr", jsonErr).Error("t.processTransaction failed")
return *jsonErr return *jsonErr
@ -206,7 +206,7 @@ type txnFederationClient interface {
roomVersion gomatrixserverlib.RoomVersion) (res gomatrixserverlib.RespMissingEvents, err error) roomVersion gomatrixserverlib.RoomVersion) (res gomatrixserverlib.RespMissingEvents, err error)
} }
func (t *txnReq) processTransaction(ctx context.Context, virtualHost gomatrixserverlib.ServerName) (*gomatrixserverlib.RespSend, *util.JSONResponse) { func (t *txnReq) processTransaction(ctx context.Context) (*gomatrixserverlib.RespSend, *util.JSONResponse) {
var wg sync.WaitGroup var wg sync.WaitGroup
wg.Add(1) wg.Add(1)
go func() { go func() {

View file

@ -199,7 +199,7 @@ func mustCreateTransaction(rsAPI api.FederationRoomserverAPI, fedClient txnFeder
} }
func mustProcessTransaction(t *testing.T, txn *txnReq, pdusWithErrors []string) { func mustProcessTransaction(t *testing.T, txn *txnReq, pdusWithErrors []string) {
res, err := txn.processTransaction(context.Background(), "localhost") res, err := txn.processTransaction(context.Background())
if err != nil { if err != nil {
t.Errorf("txn.processTransaction returned an error: %v", err) t.Errorf("txn.processTransaction returned an error: %v", err)
return return