Change io_sock reference to sock