Skip to content

Commit

Permalink
fix: order of close for interTransport
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejonas committed Sep 3, 2021
1 parent 78651fa commit b059c5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/hooks/useTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ const getTransportFromType = async (
},
});
}
public close() {
public async close() {
intermediateTransport.unsubscribe();
intermediateTransport.close();
return intermediateTransport.sendData({
intermediateTransport.sendData({
internalID: 0,
request: {
jsonrpc: "2.0",
Expand All @@ -84,6 +83,7 @@ const getTransportFromType = async (
id: 0,
},
});
intermediateTransport.close();
}
}
localTransport = new InterTransport();
Expand Down

0 comments on commit b059c5d

Please sign in to comment.