Skip to content

Argument 2 passed to Amp\\Artax\\ConnectionInfo::__construct() must b…#4

Open
amarchenk0 wants to merge 1 commit intoamphp:masterfrom
amarchenk0:fix-type-error
Open

Argument 2 passed to Amp\\Artax\\ConnectionInfo::__construct() must b…#4
amarchenk0 wants to merge 1 commit intoamphp:masterfrom
amarchenk0:fix-type-error

Conversation

@amarchenk0
Copy link
Copy Markdown

Argument 2 passed to Amp\Artax\ConnectionInfo::__construct() must be of the type string, null given.
In some cases cannon retrieve remote address, method $socket->getRemoteAddress() return null, but for class ConnectionInfo second argument must be a string only.

@kelunik
Copy link
Copy Markdown
Member

kelunik commented Sep 16, 2019

If this is the case, the connection probably broke already?

@amarchenk0
Copy link
Copy Markdown
Author

Yes, it's not happy path, after my fix exception is: "Amp/ByteStream/StreamException" with message:
"The stream was closed by the peer"

But it's better than type error :)

It's case like: I need fix error to see Error :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants