Explorar o código

Fix quic-go error message matching in quic.isErrorIndicatingClosed

Rod Hynes %!s(int64=4) %!d(string=hai) anos
pai
achega
78d82c60c9
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  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
 		return false
 	}
 	}
 	errStr := err.Error()
 	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" ||
 	return errStr == "Application error 0x0" ||
-		errStr == "NO_ERROR: No recent network activity"
+		errStr == "timeout: no recent network activity"
 }
 }
 
 
 func dialQUIC(
 func dialQUIC(