Skip to content
Merged
Changes from all commits
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
9 changes: 8 additions & 1 deletion src/Client/DockerApiClientWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,14 @@ public function listenForEvents(callable $eventCallback): void
$client = $this->eventStreamClient ?? HttpClient::create([
'base_uri' => $this->baseUri,
'bindto' => $this->socketPath,
'timeout' => null,
// Infinite idle timeout. The Docker event stream is long-lived and
// often silent for minutes. A finite timeout (php.ini
// default_socket_timeout, 60s by default) ends the stream on idle,
// so listenForEvents() returns and the process exits — under a
// "restart: always" container that shows up as a restart every 60s.
// -1 disables the idle timeout, so the listener blocks until a real
// event or a genuine end-of-stream arrives.
'timeout' => -1,
]);

$serializer = new Serializer(
Expand Down