Open jluis opened 8 years ago
Thanks! You'll probably want to use $daemon->listen
instead to get the address that can't be listened to (see http://mojolicious.org/perldoc/Mojo/Server/Daemon#listen). That way if Mojolicious changes how it finds the listen address, we aren't caught trying to keep up.
There needs to be a test written. Starting up one daemon before trying to start a second should be enough to make the failure case happen.
Is this the only error message that could be thrown by $daemon->start
? It might be better to use a regex to match $@
before customizing the error message.
Thanks for your pointers.
I did the pull request so early, because I had not noticed that pushed commits that reference an issue got a link in the issue thread, to get feedback.
I plan to look at Mojo source to see how and what messages throws when dies as I have noticed that this particular message has parts that depend on $ENV{LANG} .
I will also create a test for it on t/command/daemon.t
I suppose that it is OK to include in the pull request both files and all chain of commits, isn't it?
This seems like it's a single change, so it should likely be a single commit. So you can amend your current commit, and then force-push to update the pull request. Otherwise, I can squash the commits when I merge, either way.
I messed the pull request a little as I don't use normally amended commits. i@preaction I will try to addres other isues now
No worries, we can clean up the commits later. Let me know if you've got any questions.
"Can't create listen socket: Address already in use" is rewriten as "Can't create listen socket on port $port: Address already in use"
Signed-off-by: Jose Luis Perez Diez jluis@escomposlinux.org