-
-
Notifications
You must be signed in to change notification settings - Fork 478
deps: patch @libp2p/tcp to fix network worker shutdown hang #9825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| diff --git a/dist/src/socket-to-conn.js b/dist/src/socket-to-conn.js | ||
| index 2ef149718745e5901cdce459d73dcb3d4b7e596e..a8a2ba0830c4f1cb42bd555112ee01dead908c2f 100644 | ||
| --- a/dist/src/socket-to-conn.js | ||
| +++ b/dist/src/socket-to-conn.js | ||
| @@ -88,6 +88,10 @@ class TCPSocketMultiaddrConnection extends AbstractMultiaddrConnection { | ||
| await pEvent(this.socket, 'close', options); | ||
| } | ||
| sendReset() { | ||
| + if (this.socket.writableEnded) { | ||
| + this.socket.destroy(); | ||
| + return; | ||
| + } | ||
| this.socket.resetAndDestroy(); | ||
| } | ||
| sendPause() { | ||
| diff --git a/src/socket-to-conn.ts b/src/socket-to-conn.ts | ||
| index c4a085b17b6326c96b305741af6b1717cd8a2714..4fba3375008e899bb60eef0382cb4d9c6245525f 100644 | ||
| --- a/src/socket-to-conn.ts | ||
| +++ b/src/socket-to-conn.ts | ||
| @@ -123,6 +123,11 @@ class TCPSocketMultiaddrConnection extends AbstractMultiaddrConnection { | ||
| } | ||
|
|
||
| sendReset (): void { | ||
| + if (this.socket.writableEnded) { | ||
| + this.socket.destroy() | ||
| + return | ||
| + } | ||
| + | ||
| this.socket.resetAndDestroy() | ||
| } | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,6 +33,10 @@ allowBuilds: | |
| ssh2: true | ||
|
|
||
| overrides: | ||
| # Pin exactly while patches/@libp2p__tcp@11.0.13.patch is in place, the patch | ||
| # only applies to this version. Remove together with the patch once | ||
| # js-libp2p#3597 is released. | ||
| "@libp2p/tcp": "11.0.13" | ||
| dns-over-http-resolver: "^2.1.1" | ||
| elliptic: ">=6.6.1" | ||
| loupe: "^2.3.6" | ||
|
|
@@ -43,4 +47,5 @@ overrides: | |
| sigstore: "4.0.0" | ||
|
|
||
| patchedDependencies: | ||
| "@libp2p/tcp@11.0.13": patches/@libp2p__tcp@11.0.13.patch | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Lodestar is installed from npm, this workspace-level Useful? React with 👍 / 👎.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pretty sure this comment is wrong @matthewkeil ? |
||
| sigstore@4.0.0: patches/sigstore@4.0.0.patch | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure it's required to patch
srcbut why not 🤷