How to reset a socket back to blocking mode (after I set it to nonblocking mode)?

Did you try clearing the O_NONBLOCK flag?

opts = opts & (~O_NONBLOCK)

Leave a Comment