File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
components/workspacekit/cmd Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 9
9
"bytes"
10
10
"context"
11
11
"encoding/json"
12
+ "errors"
12
13
"fmt"
13
14
"io"
14
15
"io/ioutil"
@@ -917,17 +918,20 @@ func connectToInWorkspaceDaemonService(ctx context.Context) (*inWorkspaceService
917
918
const socketFN = "/.workspace/daemon.sock"
918
919
919
920
t := time .NewTicker (500 * time .Millisecond )
921
+ errs := errors .New ("errors of connect to ws-daemon" )
920
922
defer t .Stop ()
921
923
for {
922
924
if _ , err := os .Stat (socketFN ); err == nil {
923
925
break
926
+ } else if ! os .IsNotExist (err ) {
927
+ errs = fmt .Errorf ("%v: %w" , errs , err )
924
928
}
925
929
926
930
select {
927
931
case <- t .C :
928
932
continue
929
933
case <- ctx .Done ():
930
- return nil , xerrors .Errorf ("socket did not appear before context was canceled" )
934
+ return nil , fmt .Errorf ("socket did not appear before context was canceled: %v" , errs )
931
935
}
932
936
}
933
937
You can’t perform that action at this time.
0 commit comments