fix: trackerServer connection param check
parent
31ad07bae8
commit
94d4fab52a
|
@ -48,6 +48,9 @@ public class TrackerServer {
|
||||||
return this.inetSockAddr;
|
return this.inetSockAddr;
|
||||||
}
|
}
|
||||||
public void close(Connection connection) throws IOException {
|
public void close(Connection connection) throws IOException {
|
||||||
|
if (connection == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
//if connection enabled get from connection pool
|
//if connection enabled get from connection pool
|
||||||
if (ClientGlobal.g_connection_pool_enabled) {
|
if (ClientGlobal.g_connection_pool_enabled) {
|
||||||
ConnectionPool.closeConnection(connection);
|
ConnectionPool.closeConnection(connection);
|
||||||
|
@ -62,6 +65,9 @@ public class TrackerServer {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public void releaseConnection(Connection connection) throws IOException {
|
public void releaseConnection(Connection connection) throws IOException {
|
||||||
|
if (connection == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (ClientGlobal.g_connection_pool_enabled) {
|
if (ClientGlobal.g_connection_pool_enabled) {
|
||||||
ConnectionPool.releaseConnection(connection);
|
ConnectionPool.releaseConnection(connection);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue