Explorar el Código

Fix error handling threadz legacy profiles

A Go redefinition error causes pprof to skip parsing profile mappings.
Raul Silvera hace 9 años
padre
commit
7d7ed67f71
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2
    1
      profile/legacy_profile.go

+ 2
- 1
profile/legacy_profile.go Ver fichero

@@ -983,7 +983,8 @@ func parseAdditionalSections(l string, b *bytes.Buffer, p *Profile) (err error)
983 983
 			break
984 984
 		}
985 985
 		// Ignore any unrecognized sections.
986
-		if l, err := b.ReadString('\n'); err != nil {
986
+		var err error
987
+		if l, err = b.ReadString('\n'); err != nil {
987 988
 			if err != io.EOF {
988 989
 				return err
989 990
 			}