Skip to content

Commit

Permalink
Add comment describing rb_wait_for_single_fd return value
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Aug 2, 2023
1 parent feca08c commit fe9a7ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrib/ruby/ext/trilogy-ruby/cext.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ static int _cb_ruby_wait(trilogy_sock_t *sock, trilogy_wait_t wait)
rb_jump_tag(state);
}

// rc here comes from rb_wait_for_single_fd which (similar to poll(3)) returns 0 to indicate that the call timed out
// or -1 to indicate a system error with errno set.
if (args.rc < 0)
return TRILOGY_SYSERR;
if (args.rc == 0)
Expand Down

0 comments on commit fe9a7ae

Please sign in to comment.