kakserpom / phpdaemon

Asynchronous server-side framework for network applications implemented in PHP using libevent
http://daemon.io/
GNU Lesser General Public License v3.0
1.53k stars 231 forks source link

ShellCommand::exec #294

Closed Alxdhere closed 6 years ago

Alxdhere commented 6 years ago

Migrate phpdaemon to PHP 7.2. Don't work a \PHPDaemon\Core\ShellCommand::exec. Down and close websocket connection on lines: $o->bind('read', function ($o) use (&$data, $o) { $data .= $o->readUnlimited(); }); I try to commit this lines and next lines: $o->bind('eof', function ($o) use (&$data, $cb) { $cb($o, $data); $o->close(); }); $o->execute($binPath, $args, $env); Error is disappear and connection of websocket does not close. But exec not work :) Help me, please.

Alxdhere commented 6 years ago

Remove $o in use (): $o->bind('read', function ($o) use (&$data) { $data .= $o->readUnlimited(); });