-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle other port already in use error message (#118)
New error message '[datastore] Exiting due to exception: java.net.BindException: Address already in use'
- Loading branch information
Showing
2 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const DEV_APP_PORT_BIND_ERRORS = [ | ||
'[datastore] Exiting due to exception: java.io.IOException: Failed to bind', | ||
'[datastore] Exiting due to exception: java.net.BindException: Address already in use', | ||
] | ||
|
||
function isPortAlreadyInUse(text) { | ||
return DEV_APP_PORT_BIND_ERRORS | ||
.some(message => text.includes(message)) | ||
} | ||
|
||
module.exports = isPortAlreadyInUse |