fix: Check if start is nil before consuming in echo provisioner (#2686)

This caused a race seen here:
https://github.com/coder/coder/runs/7074123929?check_suite_focus=true#step:10:217
This commit is contained in:
Kyle Carberry
2022-06-27 09:57:37 -05:00
committed by GitHub
parent 82938944e7
commit 33a04f661f
+4
View File
@@ -82,6 +82,10 @@ func (e *echo) Provision(stream proto.DRPCProvisioner_ProvisionStream) error {
return err
}
request := msg.GetStart()
if request == nil {
// A cancel could occur here!
return nil
}
for index := 0; ; index++ {
extension := ".protobuf"
if request.DryRun {