SlyMarbo / spdy

[deprecated] A full-featured SPDY library for the Go language.
BSD 2-Clause "Simplified" License
118 stars 13 forks source link

Panic to close a running ResponseStream #95

Closed iyangsj closed 9 years ago

iyangsj commented 9 years ago

It' s not safe to close a running ResponseStream.

ResponseStream.Close() will set header field to nil, but header feild may be concurrently accessed by the ResponseStream.Run() which is executed in another goroutine.

The defer/recover pattern does not slove that problem, and may cause resource leaking.

SlyMarbo commented 9 years ago

Thanks for the help