Skip to content

Commit

Permalink
Merge pull request #93 from clue-labs/right-connection
Browse files Browse the repository at this point in the history
Fix ConnectionInterface return type hint in Factory
  • Loading branch information
WyriHaximus authored Feb 4, 2019
2 parents 780d55c + f493854 commit c5ac28b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use React\Promise\Timer\TimeoutException;
use React\Socket\Connector;
use React\Socket\ConnectorInterface;
use React\Socket\ConnectionInterface;
use React\Socket\ConnectionInterface as SocketConnectionInterface;
use React\MySQL\Io\LazyConnection;

class Factory
Expand Down Expand Up @@ -146,13 +146,13 @@ public function createConnection($uri)
$reject(new \RuntimeException('Connection to database server cancelled'));

// either close successful connection or cancel pending connection attempt
$connecting->then(function (ConnectionInterface $connection) {
$connecting->then(function (SocketConnectionInterface $connection) {
$connection->close();
});
$connecting->cancel();
});

$connecting->then(function (ConnectionInterface $stream) use ($parts, $deferred) {
$connecting->then(function (SocketConnectionInterface $stream) use ($parts, $deferred) {
$executor = new Executor();
$parser = new Parser($stream, $executor);

Expand Down

0 comments on commit c5ac28b

Please sign in to comment.