8000 [MonologBridge] Fix the Monlog ServerLogHandler from Hanging on Windows by ChadSikorra · Pull Request #22787 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[MonologBridge] Fix the Monlog ServerLogHandler from Hanging on Windows #22787

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Close the socket using stream_socket to avoid hangs.
  • Loading branch information
ChadSikorra committed May 19, 2017
commit 023cf011456c81bdb4489f641a7bd7d46e00cbe3
2 changes: 1 addition & 1 deletion src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function handle(array $record)
$recordFormatted = $this->formatRecord($record);

if (-1 === stream_socket_sendto($this->socket, $recordFormatted)) {
fclose($this->socket);
stream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);

// Let's retry: the persistent connection might just be stale
if ($this->socket = $this->createSocket()) {
Expand Down
0