diff options
| author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2024-10-09 21:52:30 +1300 |
|---|---|---|
| committer | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2024-10-09 23:48:53 +1300 |
| commit | 04ddb7e8084aa2fdb07ca4da2b4369cca275c1d9 (patch) | |
| tree | 8c64196f7b3b1c1a4a6461b968898c054a2874b8 /ext | |
| parent | 3031bf6bd46c56f90f1944e41dcb4a5fb9948e40 (diff) | |
Update `Socket#accept` to use `rb_io_blocking_region`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11844
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/socket/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/init.c b/ext/socket/init.c index 0e312b540e..ab847cb267 100644 --- a/ext/socket/init.c +++ b/ext/socket/init.c @@ -719,7 +719,7 @@ rsock_s_accept(VALUE klass, VALUE io, struct sockaddr *sockaddr, socklen_t *len) #ifdef RSOCK_WAIT_BEFORE_BLOCKING rb_io_wait(fptr->self, RB_INT2NUM(RUBY_IO_READABLE), Qnil); #endif - peer = (int)BLOCKING_REGION_FD(accept_blocking, &accept_arg); + peer = (int)rb_io_blocking_region(fptr, accept_blocking, &accept_arg); if (peer < 0) { int error = errno; |
