Skip to content

Commit

Permalink
fix transport integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Mar 6, 2024
1 parent 3832d79 commit 9251cce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion p2p/transport/webrtc/connection.go
Expand Up @@ -175,7 +175,7 @@ func (c *connection) AcceptStream() (network.MuxedStream, error) {
case <-c.ctx.Done():
return nil, c.closeErr
case dc := <-c.acceptQueue:
str := newStream(dc.channel, dc.stream, maxRTT,func() { c.removeStream(*dc.channel.ID()) }, c.onDataChannelClose)
str := newStream(dc.channel, dc.stream, maxRTT, func() { c.removeStream(*dc.channel.ID()) }, c.onDataChannelClose)
if err := c.addStream(str); err != nil {
str.Reset()
return nil, err
Expand Down Expand Up @@ -215,6 +215,7 @@ func (c *connection) onDataChannelClose(remoteClosed bool) {
if !remoteClosed {
if c.invalidDataChannelClosures.Add(1) > maxInvalidDataChannelClosures {
c.closeOnce.Do(func() {
log.Error("closing connection as peer is not closing datachannels: ", c.RemotePeer(), c.RemoteMultiaddr())
c.closeWithError(errors.New("peer is not closing datachannels"))
})
}
Expand Down

0 comments on commit 9251cce

Please sign in to comment.