We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e1311f commit c2d6e6cCopy full SHA for c2d6e6c
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