-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
When the bind of the server socket fails, davmail does not exit. For example:
Using system provided JRE
openjdk version "25.0.1" 2025-10-21
OpenJDK Runtime Environment (build 25.0.1)
OpenJDK 64-Bit Server VM (build 25.0.1, mixed mode, sharing)
2026-01-18 09:04:39,495 DEBUG [main] davmail.DavGateway - Start DavMail in server mode
2026-01-18 09:04:39,514 ERROR [main] davmail - Unable to bind server socket for CALDAV on port 25000: port not allowed or in use by another process
I would expect davmail to exit with a proper error code in such cases. Is there a reason why it doesn't do that? Because I don't see any point in letting davmail continue afterwards as nobody can connect to it. Am I missing something?
The reason why it matters is that I am using davmail programmatically in another application and this behavior makes it really hard to handle errors properly. The only way I see currently is to parse davmail's output to detect that, but this is really hard to do reliably.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels