-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[FrameworkBundle] print error message if server couldn't be started #12258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@weaverryan Can you leave it open for a while? This fix does only work when you execute |
@xabbuh Any news on this one? |
@fabpot I'm actually not sure how we could fix this best. Should we test with |
84a5ae6
to
1343ae3
Compare
I updated the pull request. The command now tries to connect to a server listening on the socket to check if the socket is free to be used by the built-in web server. @fabpot You will be able to rebase this onto the |
|
||
list($hostname, $port) = explode(':', $address); | ||
|
||
return @fsockopen($hostname, $port, $errno, $errstr, 5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should close the socket again before returning in case you manage to open it, to avoid leaking a socket descriptor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
1343ae3
to
10e724b
Compare
Thank you @xabbuh. |
…e started (xabbuh) This PR was submitted for the master branch but it was merged into the 2.6 branch instead (closes #12258). Discussion ---------- [FrameworkBundle] print error message if server couldn't be started As @weaverryan noticed in symfony/symfony-docs#4005, the `server:run` command would provide you with a success message even if there were a web server already listening. Commits ------- 6b2537b print error message if server couldn't be started
As @weaverryan noticed in symfony/symfony-docs#4005, the
server:run
command would provide you with a success message even if there were a web server already listening.