Skip to content

Commit 10f59a4

Browse files
authored
Merge pull request #88 from buggregator/hotfix/monolog-socket-events
Fixes problem with sending monolog logs via socket connection
2 parents 1b876a9 + 1311717 commit 10f59a4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/modules/Monolog/Interfaces/TCP/Service.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ public function handle(Request $request): ResponseInterface
2626
return new ContinueRead();
2727
}
2828

29+
if ($request->event === TcpEvent::Close) {
30+
return new CloseConnection();
31+
}
32+
2933
$messages = \array_filter(\explode("\n", $request->body));
3034

3135
foreach ($messages as $message) {
@@ -44,6 +48,6 @@ public function handle(Request $request): ResponseInterface
4448
);
4549
}
4650

47-
return new CloseConnection();
51+
return new ContinueRead();
4852
}
4953
}

0 commit comments

Comments
 (0)