فهرست منبع

Fix quic-go error message matching in quic.isErrorIndicatingClosed

Rod Hynes 4 سال پیش
والد
کامیت
78d82c60c9
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      psiphon/common/quic/quic.go

+ 3 - 2
psiphon/common/quic/quic.go

@@ -875,9 +875,10 @@ func (s *ietfQUICSession) isErrorIndicatingClosed(err error) bool {
 		return false
 	}
 	errStr := err.Error()
-	// The target error is of type *qerr.QuicError, but is not exported.
+	// The target errors are of type qerr.ApplicationError and
+	// qerr.IdleTimeoutError, but these are not exported by quic-go.
 	return errStr == "Application error 0x0" ||
-		errStr == "NO_ERROR: No recent network activity"
+		errStr == "timeout: no recent network activity"
 }
 
 func dialQUIC(