1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 12:47:39 +02:00

Merge branch '1.x'

This commit is contained in:
Jordi Boggiano
2016-03-07 12:30:07 +00:00
2 changed files with 12 additions and 0 deletions

View File

@@ -241,6 +241,10 @@ class SlackHandler extends SocketHandler
protected function write(array $record)
{
parent::write($record);
$res = $this->getResource();
if (is_resource($res)) {
@fread($res, 2048);
}
$this->closeSocket();
}

View File

@@ -255,6 +255,14 @@ class SocketHandler extends AbstractProcessingHandler
return (string) $record['formatted'];
}
/**
* @return resource|null
*/
protected function getResource()
{
return $this->resource;
}
private function connect()
{
$this->createSocketResource();