Comments (6)
If the remote host closes the socket early, this raises an E_WARNING when calling stream_socket_accept.
We have yet to find a way to reproduce the issue you're seeing. I've given this several attempts, but failed to raise an error here so far.
Perhaps https://3v4l.org/LlXo1 could be a good starting point.
This turns into an exception (depending on your configuration).
I'm not sure I follow? If we manage to reproduce this, then this will raise an (uncaught) E_WARNING
only and will then raise an error
event as documented.
Seeing as the output of this function is checked (false or something else) exactly one line after it is called, it makes sense to suppress the warnings and use the existing handling for this case.
Agreed, we should not raise any warnings whatsoever.
from socket.
It raises the E_WARNING immediately, the error event handler will not happen (this is because that event gets raised because of some function output, but the warning pops up as soon as the function executes).
I'll try and see if I can get a good simple case going tomorrow. As I said on the pull request, I've only managed to reproduce the issue using HAProxy's tcp-check so far.
from socket.
It raises the E_WARNING immediately, the error event handler will not happen (this is because that event gets raised because of some function output, but the warning pops up as soon as the function executes).
I agree that this warning shouldn't be raised to begin with and we should address this. However, this warning alone should not interfere with the error event handler and should not stop script execution. In other words, we have yet to reproduce how this "crashes".
For the reference, the accept(2) man pages list some error conditions which should help in providing a test script.
from socket.
@krageon can you share how you can reproduce it? I'de like to get this thing resolved so I'm looking into making a test for it
from socket.
A little while ago I sat down with a colleague of mine in an attempt to replicate a simpler version of the environment that produces this, but we can't seem to do it outside of where it actually occurs. At this point I'm more inclined to say it's not necessarily a problem with the library, but with where I'm using it.
from socket.
fixed in #23
from socket.
Related Issues (20)
- Keep tcp connection alive HOT 2
- Certificates using mkcet fail handshake HOT 4
- Additional suggestion HOT 2
- Get write response HOT 2
- Problem with DNS request in socket connector HOT 3
- Socket server need to restart on day start HOT 11
- verify_peer should default to false for React\Socket\Server using TLS context HOT 1
- TcpConnector - are writes buffered or sent immediately? HOT 10
- Listening multiple socket chanels on the same server HOT 2
- Write never send data HOT 2
- Failed tests with OpenSSL 3 HOT 5
- EventBase::loop(): kevent: Bad file descriptor HOT 6
- [Security] Response size limitation HOT 2
- [v1.11.0] Accessing array offset on null value - Failed TCP connection without ext-sockets HOT 2
- How to handle socket connection on Server HOT 4
- Interactive client example? HOT 2
- How to deploy the server? HOT 1
- New to reactphp : I think my problem is easy for you HOT 3
- Memory leak in TcpServer due to PHP stream_context_create memory leak HOT 5
- Roadmap to reactphp/socket v3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from socket.