Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
add an error check that we actually received the peer's public key
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Aug 1, 2019
1 parent c01848a commit 50db8cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package libp2pquic

import (
"context"
"errors"
"fmt"
"net"
"sync"
Expand Down Expand Up @@ -125,6 +126,7 @@ func (t *transport) Dial(ctx context.Context, raddr ma.Multiaddr, p peer.ID) (tp
var remotePubKey ic.PubKey
select {
case remotePubKey = <-keyCh:
return nil, errors.New("go-libp2p-quic-transport BUG: expected remote pub key to be set")
default:
}

Expand Down

0 comments on commit 50db8cf

Please sign in to comment.