Skip to content

Commit

Permalink
trywait
Browse files Browse the repository at this point in the history
  • Loading branch information
hazae41 committed May 28, 2023
1 parent 1c653e6 commit 7ca33c3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@hazae41/cursor": "^1.1.14",
"@hazae41/future": "^1.0.3",
"@hazae41/option": "^1.0.9",
"@hazae41/plume": "^2.0.4",
"@hazae41/plume": "^2.0.6",
"@hazae41/result": "^1.0.34",
"@hazae41/x509": "^1.1.5"
},
Expand Down
4 changes: 2 additions & 2 deletions src/mods/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ export class TlsClientDuplex {
const client_hello_handshake_record = PlaintextRecord.from(client_hello_handshake, 0x0301)
this.#writer.enqueue(client_hello_handshake_record)

await Plume.tryWaitStream(this.read, "handshaked", () => {
await Plume.tryWaitOrStream(this.read, "handshaked", () => {
return new Ok(new Some(Ok.void()))
}, AbortSignal.timeout(5_000)).then(r => r.throw(t))
}).then(r => r.throw(t))

return Ok.void()
})
Expand Down

0 comments on commit 7ca33c3

Please sign in to comment.