diff --git a/CSRedis/Internal/Commands/RedisRoleCommand.cs b/CSRedis/Internal/Commands/RedisRoleCommand.cs index 01b192a..a14cb2c 100644 --- a/CSRedis/Internal/Commands/RedisRoleCommand.cs +++ b/CSRedis/Internal/Commands/RedisRoleCommand.cs @@ -38,15 +38,15 @@ static RedisMasterRole ParseMaster(int num, string role, RedisReader reader) reader.ExpectSize(3, num); long offset = reader.ReadInt(); reader.ExpectType(RedisMessage.MultiBulk); - var slaves = new Tuple[reader.ReadInt(false)]; + var slaves = new Tuple[reader.ReadInt(false)]; for (int i = 0; i < slaves.Length; i++) { reader.ExpectType(RedisMessage.MultiBulk); reader.ExpectSize(3); string ip = reader.ReadBulkString(); int port = Int32.Parse(reader.ReadBulkString()); - int slave_offset = Int32.Parse(reader.ReadBulkString()); - slaves[i] = new Tuple(ip, port, slave_offset); + long slave_offset = long.Parse(reader.ReadBulkString()); + slaves[i] = new Tuple(ip, port, slave_offset); } return new RedisMasterRole(role, offset, slaves); } diff --git a/CSRedis/Types.cs b/CSRedis/Types.cs index d423696..9c17483 100644 --- a/CSRedis/Types.cs +++ b/CSRedis/Types.cs @@ -205,7 +205,7 @@ internal RedisRole(string roleName) public class RedisMasterRole : RedisRole { readonly long _replicationOffset; - readonly Tuple[] _slaves; + readonly Tuple[] _slaves; /// /// Get the master replication offset @@ -215,9 +215,9 @@ public class RedisMasterRole : RedisRole /// /// Get the slaves associated with the current master /// - public Tuple[] Slaves { get { return _slaves; } } + public Tuple[] Slaves { get { return _slaves; } } - internal RedisMasterRole(string role, long replicationOffset, Tuple[] slaves) + internal RedisMasterRole(string role, long replicationOffset, Tuple[] slaves) : base(role) { _replicationOffset = replicationOffset;