You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warning: feof(): 60 is not a valid stream resource in .. /src/Socket/Connection.php on line 18 #4
@jeremykendall, thanks for your script! We can now successfully reproduce this issue. I believe this to be an issue in the react/dns component. Would you care to report the error over in the corresponding project?
This might also be the reason why @andig experiences the same issue in the react/http-client component. It uses the react/dns component to resolve hostnames to IPs. @andig, would you care to verify that this should work when you use IPs instead of hostnames?
The underlying problem appears to be that the Connection represents an incoming server side connection. It MUST NOT be used as an outgoing connection in a client side context. I've just filed ticket #13 to update the documentation to reflect this.
Does anybody else experience the same issue in a different context?
Thanks for the confirmation @andig. The React\Socket\Connection must only be used in a server side context, all other streams should use the React\Stream\Stream class instead. I've filed PR #13 to update the documentation to reflect this, but otherwise everything is already there.
Thanks for reporting back @miladr, would you care to also describe how to reproduce the issue you were having?
See also my above comment for details. As it currently stands it appears to be caused by using React\Socket\Connection in places where a React\Stream\Stream should be used instead.
Thanks for the confirmation @andig. The React\Socket\Connection must only be used in a server side context, all other streams should use the React\Stream\Stream class instead. I've filed PR #13 to update the documentation to reflect this,
Thanks @miladr, so the error you were having also boils down to the react/dns component as described above.
@andig, afaict yes. Unless anybody else happens to come up with any other source of this issue, I'm having to assume this is only caused by the dns component.
Activity
brieucthomas commentedon Jul 23, 2014
I have the same error when the connection is closed from a
datalistener.A solution : detect the end of stream before dispatching
dataevent.A temporary solution is to specify
falseon closure output :cboden commentedon Aug 16, 2014
Would you be able to provide instructions on how to replicate this error?
jeremykendall commentedon Aug 27, 2014
I got (almost) the same error this morning while working on the DNS basic usage example. Maybe this could help replicate the warning:
Running
php dns.php jeremykendall.netreturned:Environment:
RadekDvorak commentedon Sep 10, 2014
The solution suggested by brieucthomas did work for me though I had to check for NULL data as well.
andig commentedon Oct 7, 2014
Similar problem here running
http-clienton windows:Update: fix from @webzak confirmed working.
andig commentedon Nov 14, 2014
Any chance this is gonna be fixed? Stumpes me every time I'm doing a composer install :(
clue commentedon Nov 15, 2014
@jeremykendall, thanks for your script! We can now successfully reproduce this issue. I believe this to be an issue in the react/dns component. Would you care to report the error over in the corresponding project?
This might also be the reason why @andig experiences the same issue in the react/http-client component. It uses the react/dns component to resolve hostnames to IPs. @andig, would you care to verify that this should work when you use IPs instead of hostnames?
The underlying problem appears to be that the
Connectionrepresents an incoming server side connection. It MUST NOT be used as an outgoing connection in a client side context. I've just filed ticket #13 to update the documentation to reflect this.Does anybody else experience the same issue in a different context?
andig commentedon Nov 15, 2014
Verified - this is my current workaround.
Does that mean that a new type of client connection needs to be developed now? Would this be goal of this issue then?
miladr commentedon Nov 29, 2014
@brieucthomas solution worked for me. No warning anymore.
clue commentedon Nov 29, 2014
Thanks for the confirmation @andig. The
React\Socket\Connectionmust only be used in a server side context, all other streams should use theReact\Stream\Streamclass instead. I've filed PR #13 to update the documentation to reflect this, but otherwise everything is already there.Thanks for reporting back @miladr, would you care to also describe how to reproduce the issue you were having?
See also my above comment for details. As it currently stands it appears to be caused by using
React\Socket\Connectionin places where aReact\Stream\Streamshould be used instead.miladr commentedon Nov 29, 2014
You are welcome.
I'm creating a Http testing tool for our project.
I used this code to send Http requests.
andig commentedon Nov 29, 2014
@clue
I'm having my slow day. https://github.com/reactphp/dns/blob/master/src/Query/Executor.php uses
React\Socket\Connectionwhich should not be the case?So this is the piece that needs to be fixed and is currently missing imho?
clue commentedon Nov 29, 2014
Thanks @miladr, so the error you were having also boils down to the react/dns component as described above.
@andig, afaict yes. Unless anybody else happens to come up with any other source of this issue, I'm having to assume this is only caused by the dns component.
clue commentedon Dec 3, 2014
I've forwarded this error report to the component that is actually the source of this error:
reactphp/dns#13
Afaict this component does not need to be patched.
Can we close this ticket?
jeremykendall commentedon Dec 3, 2014
@clue I vote yes. Thanks for your hard work on this.
andig commentedon Dec 3, 2014
@clue that's what I've meant- thank you!