1
0
Fork 0

Add comments to a sophisticated code part

This commit is contained in:
Gregory Eremin 2014-07-17 20:49:11 +07:00
parent 580a618b5f
commit f32091c3cd
1 changed files with 2 additions and 2 deletions

View File

@ -68,13 +68,13 @@ func (r *Request) TryRespond(rsp Response) bool {
go func() {
defer func() {
err := recover()
if err != nil {
if err != nil { // Panic!
r.Dead = true
okch <- false
}
}()
r.ResponseCh <- rsp
r.ResponseCh <- rsp // If channel is already closed expect a panic
okch <- true
}()