From 3e8378a6c4f6ad4b2fe2d21ecc21441797c0049a Mon Sep 17 00:00:00 2001 From: chenjunbiao Date: Mon, 3 Aug 2020 10:51:23 +0800 Subject: [PATCH] Fix/network panic (#23) fix(stream): fix panic of 'No recent network activity' --- pkg/util/quic.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/util/quic.go b/pkg/util/quic.go index 117c5b19a..204d4d168 100644 --- a/pkg/util/quic.go +++ b/pkg/util/quic.go @@ -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 {