Commit ff3ea11
Maciej Mucha
Fix client state not being reset after failed Start()
When Start() fails due to a real error (e.g., database connection failure),
the client's internal state was left in a running state, preventing subsequent
Start() calls from succeeding.
Add StartFailed() method to BaseStartStop that properly resets internal state
after a startup failure. This is separate from Stop() handling - when Stop()
cancels the context (ErrStop), Stop() itself handles cleanup via finalizeStop().
Fixes the issue where a client could not be restarted after a transient
startup failure.1 parent f6feb51 commit ff3ea11
2 files changed
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1071 | 1071 | | |
1072 | 1072 | | |
1073 | 1073 | | |
1074 | | - | |
1075 | | - | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
| 1074 | + | |
| 1075 | + | |
1080 | 1076 | | |
| 1077 | + | |
1081 | 1078 | | |
1082 | 1079 | | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
1083 | 1083 | | |
1084 | 1084 | | |
1085 | 1085 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
139 | 161 | | |
140 | 162 | | |
141 | 163 | | |
| |||
0 commit comments