File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ func (connection *Connection) Started() (bool, error) {
37
37
func (connection * Connection ) Running () (bool , error ) {
38
38
processID , err := connection .processID ()
39
39
if err != nil {
40
+ if errors .Is (err , os .ErrNotExist ) {
41
+ return false , nil
42
+ }
40
43
return false , err
41
44
}
42
45
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ type Status struct {
26
26
func (connection * Connection ) Status () (* Status , error ) {
27
27
managementConnection , err := connection .managementConnection ()
28
28
if err != nil {
29
- if _ , err := os .Stat (connection .controlSocketPath ()); errors .Is (err , os .ErrNotExist ) {
29
+ if _ , err := os .Stat (connection .pidPath ()); errors .Is (err , os .ErrNotExist ) {
30
30
return & Status {State : StateDisconnected }, nil
31
31
}
32
32
return nil , err
@@ -35,7 +35,7 @@ func (connection *Connection) Status() (*Status, error) {
35
35
36
36
stateData , err := managementConnection .LatestState ()
37
37
if err != nil {
38
- if _ , err := os .Stat (connection .controlSocketPath ()); errors .Is (err , os .ErrNotExist ) {
38
+ if _ , err := os .Stat (connection .pidPath ()); errors .Is (err , os .ErrNotExist ) {
39
39
return & Status {State : StateDisconnected }, nil
40
40
}
41
41
return nil , errors .Wrap (err , "failed to get latest state" )
You can’t perform that action at this time.
0 commit comments