We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5e1311f + c2d6e6c commit 88e7d1bCopy full SHA for 88e7d1b
RMQClient/RMQMultipleChannelAllocator.m
@@ -105,7 +105,9 @@ - (void)releaseChannelNumber:(NSNumber *)channelNumber {
105
106
- (NSArray *)allocatedUserChannels {
107
NSMutableArray *userChannels = [self.channels.allValues mutableCopy];
108
- [userChannels removeObjectAtIndex:0];
+ if ([userChannels count] > 0) {
109
+ [userChannels removeObjectAtIndex:0];
110
+ }
111
return [userChannels sortedArrayUsingComparator:^NSComparisonResult(id<RMQChannel> ch1, id<RMQChannel> ch2) {
112
return ch1.channelNumber.integerValue > ch2.channelNumber.integerValue;
113
}];
0 commit comments