Skip to content

Commit

Permalink
Implement a clone method to register the handler's shutdown function. (
Browse files Browse the repository at this point in the history
…#24)

This addresses an issue where a cloned handler does not flush its
buffer.
  • Loading branch information
bfoosness authored and maxbanton committed Oct 2, 2017
1 parent c030754 commit 3a0b756
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Handler/CloudWatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public function __construct(
register_shutdown_function([$this, 'close']);
}

public function __clone()
{
register_shutdown_function([$this, 'close']);
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 3a0b756

Please sign in to comment.