1
0
mirror of https://github.com/danog/amp.git synced 2025-01-22 13:21:16 +01:00

Fix missing stream property assignment

This commit is contained in:
Daniel Lowrey 2015-07-19 13:53:26 -04:00
parent e9e8476cff
commit 28154b4d70

View File

@ -272,6 +272,7 @@ class LibeventReactor implements SignalReactor {
*/
public function onReadable($stream, callable $callback, array $options = []) {
$watcher = $this->initWatcher(Watcher::IO_READER, $callback, $options);
$watcher->stream = $stream;
$evFlags = EV_PERSIST|EV_READ;
event_set($watcher->eventResource, $stream, $evFlags, $this->wrapCallback($watcher));
event_base_set($watcher->eventResource, $this->base);
@ -288,6 +289,7 @@ class LibeventReactor implements SignalReactor {
*/
public function onWritable($stream, callable $callback, array $options = []) {
$watcher = $this->initWatcher(Watcher::IO_WRITER, $callback, $options);
$watcher->stream = $stream;
$evFlags = EV_PERSIST|EV_WRITE;
event_set($watcher->eventResource, $stream, $evFlags, $this->wrapCallback($watcher));
event_base_set($watcher->eventResource, $this->base);