Add comments to a sophisticated code part
This commit is contained in:
parent
580a618b5f
commit
f32091c3cd
@ -68,13 +68,13 @@ func (r *Request) TryRespond(rsp Response) bool {
|
|||||||
go func() {
|
go func() {
|
||||||
defer func() {
|
defer func() {
|
||||||
err := recover()
|
err := recover()
|
||||||
if err != nil {
|
if err != nil { // Panic!
|
||||||
r.Dead = true
|
r.Dead = true
|
||||||
okch <- false
|
okch <- false
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
r.ResponseCh <- rsp
|
r.ResponseCh <- rsp // If channel is already closed expect a panic
|
||||||
okch <- true
|
okch <- true
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user