@@ -85,12 +85,10 @@ func (p *ProgressProxyHandler) handleProxy(id string, proxy *progressProxy) {
85
85
}
86
86
87
87
case progressProxyCreated :
88
- p .mux .Unlock ()
89
88
err := p .conn .Notify (ctx , "$/progress" , lsp.ProgressParams {
90
89
Token : id ,
91
90
Value : lsp .Raw (proxy .beginReq ),
92
91
})
93
- p .mux .Lock ()
94
92
95
93
proxy .beginReq = nil
96
94
if err != nil {
@@ -101,11 +99,9 @@ func (p *ProgressProxyHandler) handleProxy(id string, proxy *progressProxy) {
101
99
102
100
case progressProxyBegin :
103
101
if proxy .requiredStatus == progressProxyReport {
104
- p .mux .Unlock ()
105
102
err := p .conn .Notify (ctx , "$/progress" , & lsp.ProgressParams {
106
103
Token : id ,
107
104
Value : lsp .Raw (proxy .reportReq )})
108
- p .mux .Lock ()
109
105
110
106
proxy .reportReq = nil
111
107
if err != nil {
@@ -115,12 +111,10 @@ func (p *ProgressProxyHandler) handleProxy(id string, proxy *progressProxy) {
115
111
}
116
112
117
113
} else if proxy .requiredStatus == progressProxyEnd {
118
- p .mux .Unlock ()
119
114
err := p .conn .Notify (ctx , "$/progress" , & lsp.ProgressParams {
120
115
Token : id ,
121
116
Value : lsp .Raw (proxy .endReq ),
122
117
})
123
- p .mux .Lock ()
124
118
125
119
proxy .endReq = nil
126
120
if err != nil {
@@ -157,6 +151,12 @@ func (p *ProgressProxyHandler) Begin(id string, req *lsp.WorkDoneProgressBegin)
157
151
if ! ok {
158
152
return
159
153
}
154
+ if proxy .requiredStatus == progressProxyReport {
155
+ return
156
+ }
157
+ if proxy .requiredStatus == progressProxyEnd {
158
+ return
159
+ }
160
160
161
161
proxy .beginReq = req
162
162
proxy .requiredStatus = progressProxyBegin
@@ -171,7 +171,9 @@ func (p *ProgressProxyHandler) Report(id string, req *lsp.WorkDoneProgressReport
171
171
if ! ok {
172
172
return
173
173
}
174
-
174
+ if proxy .requiredStatus == progressProxyEnd {
175
+ return
176
+ }
175
177
proxy .reportReq = req
176
178
proxy .requiredStatus = progressProxyReport
177
179
p .actionRequiredCond .Broadcast ()
0 commit comments