Преглед изворни кода

Fix IETF QUIC I/O error message handling

Rod Hynes пре 6 година
родитељ
комит
b1a7d6edd2
2 измењених фајлова са 5 додато и 1 уклоњено
  1. 3 1
      psiphon/common/quic/quic.go
  2. 2 0
      psiphon/server/utils.go

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

@@ -635,8 +635,10 @@ func (s *ietfQUICSession) isErrorIndicatingClosed(err error) bool {
 	if err == nil {
 		return false
 	}
+	errStr := err.Error()
 	// The target error is of type *qerr.QuicError, but is not exported.
-	return err.Error() == "Application error 0x0"
+	return errStr == "Application error 0x0" ||
+		errStr == "NO_ERROR: No recent network activity"
 }
 
 type gQUICListener struct {

+ 2 - 0
psiphon/server/utils.go

@@ -97,6 +97,8 @@ var expectedTunnelIOErrorSubstrings = []string{
 	"deadline exceeded",
 	"NetworkIdleTimeout",
 	"PeerGoingAway",
+	"Application error 0x0",
+	"No recent network activity",
 }
 
 // isExpectedTunnelIOError checks if the error indicates failure due to tunnel