Skip to content

Commit

Permalink
Fix/network panic (#23)
Browse files Browse the repository at this point in the history
fix(stream): fix panic of 'No recent network activity'
  • Loading branch information
chenjunbiao authored Aug 3, 2020
1 parent ca7cfe1 commit 3e8378a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/util/quic.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ func QuicServer(endpoint string, plugin plugin.YomoObjectPlugin, codec *json.Cod

stream, err := sess.AcceptStream(context.Background())
if err != nil {
if strings.Index(err.Error(), "NO_ERROR") == 0 {
if strings.Index(err.Error(), "NO_ERROR") == 0 ||
strings.Index(err.Error(), "PROTOCOL_VIOLATION") == 0 {
log.Printf("AcceptStream error: %s", err.Error())
continue
} else {
Expand Down

0 comments on commit 3e8378a

Please sign in to comment.