forked from I2P_Developers/i2p.i2p
Big findbugs cleanup
This commit is contained in:
@@ -261,10 +261,7 @@ public class ConnectionPacketHandler {
|
||||
_context.statManager().addRateData("stream.con.packetsAckedPerMessageReceived", acked.size(), highestRTT);
|
||||
}
|
||||
|
||||
if (packet != null)
|
||||
return adjustWindow(con, isNew, packet.getSequenceNum(), numResends, (acked != null ? acked.size() : 0), choke);
|
||||
else
|
||||
return adjustWindow(con, false, -1, numResends, (acked != null ? acked.size() : 0), choke);
|
||||
return adjustWindow(con, isNew, packet.getSequenceNum(), numResends, (acked != null ? acked.size() : 0), choke);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -177,7 +177,6 @@ public class PacketLocal extends Packet implements MessageOutputStream.WriteStat
|
||||
if (_connection == null)
|
||||
throw new IllegalStateException("Cannot wait for accept with no connection");
|
||||
long before = _context.clock().now();
|
||||
long expiration = before+maxWaitMs;
|
||||
int queued = _connection.getUnackedPacketsSent();
|
||||
int window = _connection.getOptions().getWindowSize();
|
||||
boolean accepted = _connection.packetSendChoke(maxWaitMs);
|
||||
|
@@ -34,9 +34,10 @@ class SchedulerClosing extends SchedulerImpl {
|
||||
}
|
||||
|
||||
public boolean accept(Connection con) {
|
||||
if (con == null)
|
||||
return false;
|
||||
long timeSinceClose = _context.clock().now() - con.getCloseSentOn();
|
||||
boolean ok = (con != null) &&
|
||||
(!con.getResetSent()) &&
|
||||
boolean ok = (!con.getResetSent()) &&
|
||||
(!con.getResetReceived()) &&
|
||||
( (con.getCloseSentOn() > 0) || (con.getCloseReceivedOn() > 0) ) &&
|
||||
(timeSinceClose < Connection.DISCONNECT_TIMEOUT) &&
|
||||
|
Reference in New Issue
Block a user