support appender file rename to normal file

This commit is contained in:
YuQing
2019-11-13 17:07:01 +08:00
parent 3fb2d4952e
commit 437a993a66
9 changed files with 300 additions and 60 deletions

View File

@@ -81,29 +81,29 @@ public class TrackerServer {
public boolean isConnected(){
boolean isConnected = false;
if (sock != null){
if (sock.isConnected()){
if (sock != null) {
if (sock.isConnected()) {
isConnected = true;
}
}
return isConnected;
}
public boolean isAvaliable(){
if(isConnected()){
if(sock.getPort() == 0){
public boolean isAvaliable() {
if (isConnected()) {
if (sock.getPort() == 0) {
return false;
}
if(sock.getInetAddress() == null){
if (sock.getInetAddress() == null) {
return false;
}
if(sock.getRemoteSocketAddress() == null){
if (sock.getRemoteSocketAddress() == null) {
return false;
}
if(sock.isInputShutdown()){
if (sock.isInputShutdown()) {
return false;
}
if(sock.isOutputShutdown()){
if (sock.isOutputShutdown()) {
return false;
}
return true;