Skip to content

Commit 3f8b5f3

Browse files
committed
Improve chunk bufffering
1 parent ca9bcb1 commit 3f8b5f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/KubernetesCluster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ protected function watchLogsPath(string $path, Closure $callback, array $query =
271271
while (($data = fgets($sock, 64)) == true) {
272272
$chunk .= $data;
273273

274-
$separator = \strpos($chunk, "\n");
274+
$separator = \strrpos($chunk, "\n");
275275
if ($separator !== false) {
276276
$extra = \substr($chunk, $separator + \strlen("\n"));
277277
$chunk = \substr($chunk, 0, $separator) . "\n";

0 commit comments

Comments
 (0)