]> git.mxchange.org Git - quix0rs-gnu-social.git/commit
Fixing HTTP_Request2_SocketWrapper so it times out
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 11 Jul 2017 10:04:09 +0000 (12:04 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 11 Jul 2017 10:04:09 +0000 (12:04 +0200)
commit05a9c11c476b384e5ef3f3cc83b66406fcf7a378
treebad515b52c560edd54fd6341148209d4bfccb47c
parent9919ccb8b5a33ceb712d0a107af8753dfcea3bee
Fixing HTTP_Request2_SocketWrapper so it times out

HTTP_Request2_SocketWrapper would never time out on an fgets() call as
discussed in issue #281 https://git.gnu.io/gnu/gnu-social/issues/281

I'm patching it here by setting the socket to non-blocking mode and
using stream_select to wait until the timeout. This patch or some
similar variant must be implemented in HTTP_Request2_SocketWrapper
to avoid the same issue for other users.
extlib/HTTP/Request2/SocketWrapper.php