Skip to content

Commit

Permalink
more quic error log details
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricfung committed Jul 17, 2024
1 parent 33d1fdd commit a1aacfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions p2p/quic.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ func NewQuicConsumer(ctx context.Context, relayer string) (*QuicClient, error) {
KeepAlivePeriod: IdleTimeout / 2,
})
if err != nil {
return nil, err
return nil, fmt.Errorf("quic.DialAddr(%s) => %v", relayer, err)
}
stm, err := sess.OpenStreamSync(ctx)
if err != nil {
return nil, err
return nil, fmt.Errorf("quic.OpenStreamSync(%s, %v) => %v", relayer, sess, err)
}
return &QuicClient{
session: sess,
Expand All @@ -87,11 +87,11 @@ func (t *QuicRelayer) Close() error {
func (t *QuicRelayer) Accept(ctx context.Context) (Client, error) {
sess, err := t.listener.Accept(ctx)
if err != nil {
return nil, err
return nil, fmt.Errorf("quic.Accept() => %v", err)
}
stm, err := sess.AcceptStream(ctx)
if err != nil {
return nil, err
return nil, fmt.Errorf("quic.AcceptStream(%v) => %v", sess, err)
}
return &QuicClient{
session: sess,
Expand Down

0 comments on commit a1aacfd

Please sign in to comment.