File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -149,23 +149,21 @@ export default abstract class AbstractSource implements Authenticatable {
149
149
}
150
150
151
151
public async checkConnection ( ) {
152
- if ( this . canPoll ) {
153
- try {
154
- const res = await this . doCheckConnection ( ) ;
155
- if ( res === undefined ) {
156
- this . logger . debug ( 'Connection check was not required.' ) ;
157
- this . connectionOK = null ;
158
- return ;
159
- } else if ( res === true ) {
160
- this . logger . verbose ( 'Connection check succeeded' ) ;
161
- } else {
162
- this . logger . verbose ( `Connection check succeeded => ${ res } ` ) ;
163
- }
164
- this . connectionOK = true ;
165
- } catch ( e ) {
166
- this . connectionOK = false ;
167
- throw new ErrorWithCause ( 'Communicating with upstream service failed' , { cause : e } ) ;
152
+ try {
153
+ const res = await this . doCheckConnection ( ) ;
154
+ if ( res === undefined ) {
155
+ this . logger . debug ( 'Connection check was not required.' ) ;
156
+ this . connectionOK = null ;
157
+ return ;
158
+ } else if ( res === true ) {
159
+ this . logger . verbose ( 'Connection check succeeded' ) ;
160
+ } else {
161
+ this . logger . verbose ( `Connection check succeeded => ${ res } ` ) ;
168
162
}
163
+ this . connectionOK = true ;
164
+ } catch ( e ) {
165
+ this . connectionOK = false ;
166
+ throw new ErrorWithCause ( 'Communicating with upstream service failed' , { cause : e } ) ;
169
167
}
170
168
}
171
169
You can’t perform that action at this time.
0 commit comments