Skip to content

Commit 3d65aed

Browse files
committed
fix: extract error if xray was stopped
1 parent 536215a commit 3d65aed

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

backend/xray/jobs.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ func (x *Xray) checkXrayStatus(baseCtx context.Context) error {
5757

5858
// No error in logs, check API
5959
if !x.core.Started() {
60+
ctx, cancel := context.WithTimeout(baseCtx, 3*time.Second)
61+
err := x.extractError(ctx)
62+
cancel()
63+
64+
if err != nil {
65+
return err // Error found in logs
66+
}
67+
6068
return errors.New("xray process stopped")
6169
}
6270
}

0 commit comments

Comments
 (0)