Skip to content
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

change OpenStream to accept a context #21

Merged
merged 1 commit into from
Dec 19, 2020
Merged

Conversation

marten-seemann
Copy link

@@ -16,7 +18,7 @@ func (c *conn) IsClosed() bool {
}

// OpenStream creates a new stream.
func (c *conn) OpenStream() (mux.MuxedStream, error) {
func (c *conn) OpenStream(context.Context) (mux.MuxedStream, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mplex actually uses a context: https://github.com/libp2p/go-mplex/blob/master/multiplex.go#L322-L328 We should percolate it down.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mplex has a hardcoded timeout right now. The context should override that timeout.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raulk Opened #22 for that.

@marten-seemann marten-seemann marked this pull request as ready for review December 19, 2020 02:58
@marten-seemann marten-seemann merged commit a1836a7 into master Dec 19, 2020
@marten-seemann marten-seemann deleted the open-stream-context branch December 19, 2020 03:01
@aschmahmann aschmahmann mentioned this pull request Feb 18, 2021
73 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants