fix HandleCrash() order

This commit is contained in:
lixiaobing1 2020-07-15 18:14:10 +08:00
parent d9c3d15018
commit f0ad46f89f

View File

@ -97,9 +97,9 @@ func (sw *StreamWatcher) stopping() bool {
// receive reads result from the decoder in a loop and sends down the result channel.
func (sw *StreamWatcher) receive() {
defer utilruntime.HandleCrash()
defer close(sw.result)
defer sw.Stop()
defer utilruntime.HandleCrash()
for {
action, obj, err := sw.source.Decode()
if err != nil {