Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from jaggedsoft/master
Browse files Browse the repository at this point in the history
Merge from development
  • Loading branch information
Jon Eyrick authored Dec 22, 2017
2 parents 6af15ba + 790e55b commit 85caf9b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions php-binance-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ public function depthCache($symbols, $callback) {
$connector = new \Ratchet\Client\Connector($loop, $react);
foreach ( $symbols as $symbol ) {
if ( !isset($this->info[$symbol]) ) $this->info[$symbol] = [];
$this->info[$symbol]['depthCallback'] = $callback;
if ( !isset($this->depthQueue[$symbol]) ) $this->depthQueue[$symbol] = [];
if ( !isset($this->depthCache[$symbol]) ) $this->depthCache[$symbol] = ["bids" => [], "asks" => []];
$this->info[$symbol]['firstUpdate'] = 0;
Expand All @@ -438,8 +437,7 @@ public function depthCache($symbols, $callback) {
return;
}
$this->depthHandler($json);
//$this->info[$symbol]['depthCallback']($this, $symbol, $this->depthCache[$symbol]);
call_user_func($callback, $this, $symbol, $this->depthCache($symbol));
call_user_func($callback, $this, $symbol, $this->depthCache[$symbol]);
});
$ws->on('close', function($code = null, $reason = null) {
echo "depthCache({$symbol}) WebSocket Connection closed! ({$code} - {$reason})".PHP_EOL;
Expand Down

0 comments on commit 85caf9b

Please sign in to comment.