Ver código fonte

Merge pull request #892 from docker/fix_log_stream_end

Avoid nil pointer when reading logs of a just terminated container.
Guillaume Tardif 5 anos atrás
pai
commit
1cc0ccb189
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      aci/aci.go

+ 3 - 0
aci/aci.go

@@ -282,6 +282,9 @@ func getACIContainerLogs(ctx context.Context, aciContext store.AciContext, conta
 	if err != nil {
 		return "", fmt.Errorf("cannot get container logs: %v", err)
 	}
+	if logs.Content == nil {
+		return "", nil
+	}
 	return *logs.Content, err
 }