As discussed with Lukas Larsson, make the internal socket locking function easier to use correctly. git fetch git://github.com/tuncer/otp.git inet-lock_socket https://github.com/tuncer/otp/compare/inet-lock_socket https://github.com/tuncer/otp/compare/inet-lock_socket.patch