I've prepared backports for `ruby_3_0` and `ruby_2_7` on github, but `ruby_2_6` is not using github, so i am going to attach it here.puchuu (Andrew Aladjev)
I've found the source commit [068dd60372d659c97a76224dfce38ed96984cb6f](https://github.com/ruby/ruby/commit/068dd60372d659c97a76224dfce38ed96984cb6f) where `socklist` was introduced. `st_table` is just hash table, it looks like original ...puchuu (Andrew Aladjev)
You can easily reproduce this issue by using the following code: ``` c // socklist_insert(r, 0); st_data_t data; int insert_result_0 = st_insert(socklist, (st_data_t)r, (st_data_t)0); int lookup_result_0 = st_lookup(socklist, (s...puchuu (Andrew Aladjev)
The problem is `socklist_insert` function, you can just add the following code: ``` c socklist_insert(r, 0); fprintf(stderr, "fit %d\n", is_socket(TO_SOCKET(fd))); ``` `is_socket` has a chance to be false. `is_socket` is just an a...puchuu (Andrew Aladjev)