Fix getopts fail in redis event handlers.