mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user