fix readSync
Signed-off-by: SiYu Zhao <d.chaser.zsy@gmail.com>
This commit is contained in:
parent
a88592a634
commit
34d471769b
|
@ -52,6 +52,8 @@ func readSync(pipe io.Reader, expected syncType) error {
|
|||
if err == io.EOF {
|
||||
return fmt.Errorf("parent closed synchronisation channel")
|
||||
}
|
||||
return fmt.Errorf("failed reading error from parent: %v", err)
|
||||
}
|
||||
|
||||
if procSync.Type == procError {
|
||||
var ierr genericError
|
||||
|
@ -66,7 +68,6 @@ func readSync(pipe io.Reader, expected syncType) error {
|
|||
if procSync.Type != expected {
|
||||
return fmt.Errorf("invalid synchronisation flag from parent")
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue