The connection was not closed when master_failure_mode=fail_instantly was used. This caused rwsplit_readonly to fail.