aboutsummaryrefslogtreecommitdiff
path: root/clientapi/routing/sendevent.go
diff options
context:
space:
mode:
authorAlex Chen <Cnly@users.noreply.github.com>2019-08-06 23:33:53 +0800
committerGitHub <noreply@github.com>2019-08-06 23:33:53 +0800
commit66bf615360cfe6eac11e901ffe34f70f97330a22 (patch)
treef388b691f468c2198af2c6c6212fc6619c4b6f45 /clientapi/routing/sendevent.go
parent83f8e05032b82e2dd85d93e77643139bb3231ba2 (diff)
Fix transaction IDs in transaction cache have global scope (#772)
Diffstat (limited to 'clientapi/routing/sendevent.go')
-rw-r--r--clientapi/routing/sendevent.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/clientapi/routing/sendevent.go b/clientapi/routing/sendevent.go
index e916e451..9696b360 100644
--- a/clientapi/routing/sendevent.go
+++ b/clientapi/routing/sendevent.go
@@ -50,7 +50,7 @@ func SendEvent(
) util.JSONResponse {
if txnID != nil {
// Try to fetch response from transactionsCache
- if res, ok := txnCache.FetchTransaction(*txnID); ok {
+ if res, ok := txnCache.FetchTransaction(device.AccessToken, *txnID); ok {
return *res
}
}
@@ -83,7 +83,7 @@ func SendEvent(
}
// Add response to transactionsCache
if txnID != nil {
- txnCache.AddTransaction(*txnID, &res)
+ txnCache.AddTransaction(device.AccessToken, *txnID, &res)
}
return res