File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -209,7 +209,10 @@ func (h *http1) GetAddr() string {
209209// Status implements Proxy.
210210func (h * http1 ) Status () int32 {
211211 s := h .status .Load ()
212- if s != END && idling (h .lastdial .Load ()) {
212+ if candial2 (s ) != nil {
213+ return s // paused or ended
214+ }
215+ if idling (h .lastdial .Load ()) {
213216 return TZZ
214217 }
215218 return s
Original file line number Diff line number Diff line change @@ -333,7 +333,10 @@ func (t *piph2) Stop() error {
333333// Status implements Proxy.
334334func (t * piph2 ) Status () int32 {
335335 st := t .status .Load ()
336- if st != END && idling (t .lastdial .Load ()) {
336+ if candial2 (st ) != nil {
337+ return st // paused or ended
338+ }
339+ if idling (t .lastdial .Load ()) {
337340 return TZZ
338341 }
339342 return st
Original file line number Diff line number Diff line change @@ -330,7 +330,10 @@ func (t *pipws) Stop() error {
330330// Status implements Proxy.
331331func (t * pipws ) Status () int32 {
332332 s := t .status .Load ()
333- if s != END && idling (t .lastdial .Load ()) {
333+ if candial2 (s ) != nil {
334+ return s // paused or ended
335+ }
336+ if idling (t .lastdial .Load ()) {
334337 return TZZ
335338 }
336339 return s
Original file line number Diff line number Diff line change @@ -309,7 +309,10 @@ func (h *socks5) GetAddr() string {
309309// Status implements Proxy.
310310func (h * socks5 ) Status () int32 {
311311 s := h .status .Load ()
312- if s != END && idling (h .lastdial .Load ()) {
312+ if candial2 (s ) != nil {
313+ return s // paused or ended
314+ }
315+ if idling (h .lastdial .Load ()) {
313316 return TZZ
314317 }
315318 return s
You can’t perform that action at this time.
0 commit comments