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

fix: remove set timeout #182

Merged
merged 1 commit into from
Sep 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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