[wp-trac] [WordPress Trac] #34796: Facing an issue when using wp_remote_get with streams (non-blocking mode)

WordPress Trac noreply at wordpress.org
Mon Nov 30 06:06:12 UTC 2015


#34796: Facing an issue when using wp_remote_get with streams (non-blocking mode)
--------------------------+------------------------------
 Reporter:  bangelov      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  HTTP API      |     Version:  4.3.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by rmccue):

 A timeout is a bit of a hack; attached a patch that uses `select` to wait
 for the socket to be ready for writing to. Right now, this is hardcoded to
 wait 50µs, but might need to be bumped higher; I can't reproduce this
 locally to determine a reasonable amount.

 On my box that can't reproduce it, this adds 30µs of overhead, which is
 negligible.

 @bangelov Can you try this out, and try bumping the `50` up to see if this
 fixes your issue? I'd try up to `100000` (0.1s). We want to keep this as
 low as possible (since it's a timeout), but high enough to allow a bit of
 waiting.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34796#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list