mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
playground/socket: make output/end race less likely
This doesn't fix the race; doing that would require a bit of a redesign. Since GopherCon is this week, just put in this stop-gap measure for now. Update golang/go#11534 Change-Id: Ied6c5dd52778534a7a08b5ba3fa15c0352a65646 Reviewed-on: https://go-review.googlesource.com/11886 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
997b3545fd
commit
e645bbf898
@ -316,7 +316,7 @@ func (p *process) end(err error) {
|
||||
m.Body = err.Error()
|
||||
}
|
||||
// Wait for any outstanding reads to finish (potential race here).
|
||||
time.AfterFunc(msgDelay, func() { p.out <- m })
|
||||
time.AfterFunc(4*msgDelay, func() { p.out <- m })
|
||||
}
|
||||
|
||||
// cmd builds an *exec.Cmd that writes its standard output and error to the
|
||||
|
Loading…
x
Reference in New Issue
Block a user