FileFetchRequestHandler 구현
This commit is contained in:
@@ -143,10 +143,10 @@ public class SocketServer extends Thread implements SocketService {
|
||||
String ip = channel.socket().getInetAddress().getHostAddress();
|
||||
Integer connCount = ipTable.get( ip );
|
||||
if ( connCount == null ) {
|
||||
ipTable.put( ip, new Integer( 1 ) );
|
||||
ipTable.put( ip, 1);
|
||||
} else if ( connCount.intValue() < context.getConnLimitPerIp() ) {
|
||||
int newCount = connCount.intValue() + 1;
|
||||
ipTable.put( ip, new Integer( newCount ));
|
||||
ipTable.put( ip, newCount);
|
||||
} else {
|
||||
logger.error( CommonLib.getMessage("BECEAIMSA023", new String[]{ context.getAdapterName(), Integer.toString( context.getConnLimitPerIp() ),this.getSocketInfo( channel ) } ) );
|
||||
try {
|
||||
@@ -371,7 +371,7 @@ public class SocketServer extends Thread implements SocketService {
|
||||
int newCount = connCount.intValue() - 1;
|
||||
if ( newCount < 0 ) newCount = 0;
|
||||
|
||||
ipTable.put( ip, new Integer( newCount ) );
|
||||
ipTable.put( ip, newCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user