Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
fix: remove set timeout (#182)
Browse files Browse the repository at this point in the history
Apparently this should be fixed in node@16 which is our min version

resolves #121
  • Loading branch information
mpetrunic authored Sep 21, 2022
1 parent 9076b5b commit 23518b0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,8 @@ export class WebSockets implements Transport {
const abort = new Promise((resolve, reject) => {
onAbort = () => {
reject(new AbortError())
// FIXME: https://github.com/libp2p/js-libp2p-websockets/issues/121
setTimeout(() => {
rawSocket.close().catch(err => {
log.error('error closing raw socket', err)
})
rawSocket.close().catch(err => {
log.error('error closing raw socket', err)
})
}

Expand Down

0 comments on commit 23518b0

Please sign in to comment.