Skip to content

Commit

Permalink
add 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 1406158
Showing 1 changed file with 3 additions and 0 deletions.
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 1406158

Please sign in to comment.