Skip to content

Commit

Permalink
more debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Dec 17, 2023
1 parent ee4b066 commit 776221d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions p2p/test/transport/transport_test.go
Expand Up @@ -9,7 +9,6 @@ import (
"io"
"net"
"runtime"
"strings"
"sync"
"sync/atomic"
"testing"
Expand Down Expand Up @@ -379,9 +378,6 @@ func TestMoreStreamsThanOurLimits(t *testing.T) {
const streamCount = 1024
for _, tc := range transportsToTest {
t.Run(tc.Name, func(t *testing.T) {
if strings.Contains(tc.Name, "WebRTC") {
t.Skip("This test potentially exhausts the uint16 WebRTC stream ID space.")
}
listenerLimits := rcmgr.PartialLimitConfig{
PeerDefault: rcmgr.ResourceLimits{
Streams: 32,
Expand Down
3 changes: 3 additions & 0 deletions p2p/transport/webrtc/connection.go
Expand Up @@ -8,6 +8,7 @@ import (
"net"
"sync"
"sync/atomic"
"time"

ic "github.com/libp2p/go-libp2p/core/crypto"
"github.com/libp2p/go-libp2p/core/network"
Expand Down Expand Up @@ -176,6 +177,7 @@ func (c *connection) OpenStream(ctx context.Context) (network.MuxedStream, error
str.Reset()
return nil, fmt.Errorf("failed to add stream(%d) to connection: %w", streamID, err)
}
fmt.Println(time.Now(), "stream opened", str.id)
return str, nil
}

Expand All @@ -189,6 +191,7 @@ func (c *connection) AcceptStream() (network.MuxedStream, error) {
str.Reset()
return nil, err
}
fmt.Println(time.Now(), "stream accepted", str.id)
return str, nil
}
}
Expand Down

0 comments on commit 776221d

Please sign in to comment.