Skip to content

Commit

Permalink
Bug fixed: websocket connections were not closed
Browse files Browse the repository at this point in the history
  • Loading branch information
BeskydAbc committed Aug 28, 2021
1 parent af00e92 commit 3d4edc0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,7 @@ LIMIT :limit`
try {
const connection = new autobahn.Connection({
url: serverConfig.nearWebSocketUrl,
realm: "near-explorer",
retry_if_unreachable: true,
max_retries: 5,
max_retry_delay: 10
realm: "near-explorer"
})
connection.onopen = async session => {
const transactions = await session.call(procedure, [query, {
Expand All @@ -136,6 +133,7 @@ LIMIT :limit`
localStorage.setItem('nearTransactions', "[]")
}
setStateInitializedTransactionStore()
connection.close()
}
connection.onclose = reason => {
console.log(`Connection close: ${reason}`)
Expand Down

0 comments on commit 3d4edc0

Please sign in to comment.