We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5db84e5 commit a8dd0b7Copy full SHA for a8dd0b7
pkg/wshutil/wshrpc.go
@@ -736,21 +736,21 @@ func (w *WshRpc) setServerDone() {
736
}
737
738
func (w *WshRpc) retrySendTimeout(resId string) {
739
+ done := func() bool {
740
+ w.Lock.Lock()
741
+ defer w.Lock.Unlock()
742
+ if w.ServerDone {
743
+ return true
744
+ }
745
+ select {
746
+ case w.CtxDoneCh <- resId:
747
748
+ default:
749
+ return false
750
751
752
for {
- done := func() bool {
- w.Lock.Lock()
- defer w.Lock.Unlock()
- if w.ServerDone {
- return true
- }
- select {
- case w.CtxDoneCh <- resId:
- default:
- return false
- }()
753
- if done {
+ if done() {
754
return
755
756
time.Sleep(100 * time.Millisecond)
0 commit comments