Skip to content

Commit

Permalink
add 503 retry
Browse files Browse the repository at this point in the history
  • Loading branch information
ChlodAlejandro committed Oct 30, 2023
1 parent 91bcafb commit 4e2c791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WikimediaStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export class WikimediaStream extends EventEmitter {
} );

this.eventSource.addEventListener( 'error', ( e ) => {
if ( ( e as any ).status === 500 ) {
if ( ( e as any ).status === 500 || ( e as any ).status === 503 ) {
// Internal server error.
// Back off and try again.
setTimeout( this.open.bind( this, options ), 2e3 );
Expand Down

0 comments on commit 4e2c791

Please sign in to comment.