Skip to content

issue when opening and closing many streams #21

@whyrusleeping

Description

@whyrusleeping

A stream muxer stress test i have fails when using muxado, it appears to hang after opening and closing a certain number of streams.

To reproduce:

go get -u github.com/whyrusleeping/go-smux-muxado
cd $GOPATH/src/github.com/whyrusleeping/go-smux-muxado && go test

To make the problem a little more visible, add this print line to jbenet/go-stream-muxer:

diff --git a/test/ttest.go b/test/ttest.go
index d7523b5..29ebb79 100644
--- a/test/ttest.go
+++ b/test/ttest.go
@@ -348,6 +348,7 @@ func SubtestStreamOpenStress(t *testing.T, tr smux.Transport) {
        for i := 0; i < count*5; i++ {
                select {
                case <-recv:
+                       fmt.Println("got stream: ", i)
                case <-limit:
                        t.Fatal("timed out receiving streams")
                }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions