NETTY-418 isCompleteFailure() and isCompleteSuccess() are both true at the same time

* Fixed incorrect isPartialSuccess(), isPartialFailure(), isCompleteFailure() implementation
This commit is contained in:
Trustin Lee 2011-08-01 06:11:14 +09:00
parent acb1ac84e6
commit 95f3af0a02

View File

@ -152,17 +152,18 @@ public class DefaultChannelGroupFuture implements ChannelGroupFuture {
@Override
public synchronized boolean isPartialSuccess() {
return !futures.isEmpty() && successCount != 0;
return successCount != 0 && successCount != futures.size();
}
@Override
public synchronized boolean isPartialFailure() {
return !futures.isEmpty() && failureCount != 0;
return failureCount != 0 && failureCount != futures.size();
}
@Override
public synchronized boolean isCompleteFailure() {
return failureCount == futures.size();
int futureCnt = futures.size();
return futureCnt != 0 && failureCount == futureCnt;
}
@Override