This simple PR removes an unneeded syscall on socket close. In this state, the socket is already in non-blocking mode anyway and about to be closed anyway, so setting non-blocking mode again provides very little value whatsoever. The comment above this command suggests this might have been needed for some (unknown) legacy version, but careful testing and our test suite confirms this behavior can not be exhibited on any known versions. Given the socket is closed immediately after this call, there's little chance this could cause unwanted side effects in any real world applications in either case.
This change does not affect performance in any noticeable way, but helps avoid unneeded syscalls in an attempt to ease debugging and improve overall performance (see https://github.com/reactphp/http/issues/455). For a single HTTP request, this means the following syscalls can be eliminated:
This changeset only removes some internal logic and does not affect the public API, so it should be safe to apply. The test suite confirms this has 100% code coverage.
This simple PR removes an unneeded syscall on socket close. In this state, the socket is already in non-blocking mode anyway and about to be closed anyway, so setting non-blocking mode again provides very little value whatsoever. The comment above this command suggests this might have been needed for some (unknown) legacy version, but careful testing and our test suite confirms this behavior can not be exhibited on any known versions. Given the socket is closed immediately after this call, there's little chance this could cause unwanted side effects in any real world applications in either case.
This change does not affect performance in any noticeable way, but helps avoid unneeded syscalls in an attempt to ease debugging and improve overall performance (see https://github.com/reactphp/http/issues/455). For a single HTTP request, this means the following syscalls can be eliminated:
This changeset only removes some internal logic and does not affect the public API, so it should be safe to apply. The test suite confirms this has 100% code coverage.
Refs https://github.com/reactphp/http/issues/455