This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
fix: remove abortable-iterator and close socket directly on abort #220
Merged
achingbrain
merged 6 commits into
libp2p:master
from
dapplion:dapplion/remove-abortable
Dec 13, 2022
Merged
fix: remove abortable-iterator and close socket directly on abort #220
achingbrain
merged 6 commits into
libp2p:master
from
dapplion:dapplion/remove-abortable
Dec 13, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dapplion
commented
Oct 14, 2022
dapplion
commented
Oct 14, 2022
@@ -112,7 +106,7 @@ export const toMultiaddrConnection = (socket: Socket, options?: ToConnectionOpti | |||
socket.end() | |||
}, | |||
|
|||
source: (options.signal != null) ? abortableSource(source, options.signal) : source, |
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.
Socket source will abort when destroying it
dapplion
commented
Oct 14, 2022
@@ -92,10 +90,6 @@ export const toMultiaddrConnection = (socket: Socket, options?: ToConnectionOpti | |||
|
|||
const maConn: MultiaddrConnection = { | |||
async sink (source) { | |||
if ((options?.signal) != null) { | |||
source = abortableSource(source, options.signal) | |||
} |
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.
I don't see any usecase to having to abort the remote socket read source during dial
mpetrunic
added
the
need/maintainers-input
Needs input from the current maintainer(s)
label
Nov 8, 2022
achingbrain
changed the title
fix: remove abortable
fix: remove abortable-iterator and close socket directly on abort
Dec 12, 2022
dapplion
commented
Dec 13, 2022
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.
Thanks for completing! ❤️ LGTM
github-actions bot
pushed a commit
that referenced
this pull request
Dec 13, 2022
## [6.0.6](v6.0.5...v6.0.6) (2022-12-13) ### Bug Fixes * remove abortable-iterator and close socket directly on abort ([#220](#220)) ([28fe750](28fe750))
🎉 This PR is included in version 6.0.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I believe abortable is not necessary in this package, since we can kill the socket directly.