Open ghost opened 5 years ago
Writing into a Writer from a goroutine does not seems safe. https://www.reddit.com/r/golang/comments/3xpzom/are_the_write_funcs_in_iowritecloser_goroutinesafe/
Why do you need to write from a goroutine? Maybe you could do something like this: https://github.com/drone/drone/blob/master/server/stream.go
Description
Hi, I get the following crash if I use a copied context (inside a goroutine) and I try to start a .Stream command:
It looks like this is because the Copy function nullifies the ResponseWriter used by the stream.
How should this work? It is possible to use context.Stream inside a goroutine?
Thanks in advance for your time.