fix silly serialization mistake in DiscoveryNode

This commit is contained in:
javanna 2016-03-29 12:44:31 +02:00 committed by Luca Cavanna
parent f7becf1f53
commit 36f446759f
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ public class DiscoveryNode implements Writeable<DiscoveryNode>, ToXContent {
if (ordinal < 0 || ordinal >= Role.values().length) { if (ordinal < 0 || ordinal >= Role.values().length) {
throw new IOException("Unknown Role ordinal [" + ordinal + "]"); throw new IOException("Unknown Role ordinal [" + ordinal + "]");
} }
this.roles.add(Role.values()[in.readVInt()]); this.roles.add(Role.values()[ordinal]);
} }
this.version = Version.readVersion(in); this.version = Version.readVersion(in);
} }