Skip to content

Commit

Permalink
fix #1368, log httpServer.close error only when defined (#1369)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbcgua authored Mar 15, 2022
1 parent 4288c1e commit ec71893
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/receivers/SocketModeReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export default class SocketModeReceiver implements Receiver {
if (this.httpServer !== undefined) {
// This HTTP server is only for the OAuth flow support
this.httpServer.close((error) => {
this.logger.error(`Failed to shutdown the HTTP server for OAuth flow: ${error}`);
if (error) this.logger.error(`Failed to shutdown the HTTP server for OAuth flow: ${error}`);
});
}
return new Promise((resolve, reject) => {
Expand Down

0 comments on commit ec71893

Please sign in to comment.