[haiku-bugs] Re: [Haiku] #9734: Receiving from a nonblocking socket causes "Operation timed out" error

  • From: "phoudoin" <trac@xxxxxxxxxxxx>
  • Date: Fri, 03 May 2013 14:02:28 -0000

#9734: Receiving from a nonblocking socket causes "Operation timed out" error
--------------------------------------+----------------------------
   Reporter:  markh                   |      Owner:  phoudoin
       Type:  bug                     |     Status:  assigned
   Priority:  normal                  |  Milestone:  R1
  Component:  Network & Internet/UDP  |    Version:  R1/Development
 Resolution:                          |   Keywords:
 Blocked By:                          |   Blocking:
Has a Patch:  0                       |   Platform:  All
--------------------------------------+----------------------------
Changes (by phoudoin):

 * status:  new => assigned
 * owner:  zooey => phoudoin


Comment:

 Replying to [comment:3 bonefish]:
 > Usually it is necessary to convert relative timeouts to absolute ones,
 > so that syscall aren't restarted with the full timeout each time.
 > That might not be relevant here.

 In fact, it is.
 Thanks for the explanation.

 > An alternative for your case might be to check the return code and,
 > if it is `B_TIMED_OUT` convert to `B_WOULD_BLOCK`,
 > if the timeout is 0.
 > Not that elegant, but IIRC other code does it the same way.

 I guess that the way to go, indeed.
 I'll do that, except if someone does it before.

--
Ticket URL: <http://dev.haiku-os.org/ticket/9734#comment:4>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: