소스 검색

update log

v2ray 9 년 전
부모
커밋
87cb0d5dc9
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      transport/internet/tcp_hub.go

+ 3 - 2
transport/internet/tcp_hub.go

@@ -42,10 +42,12 @@ func ListenTCP(address v2net.Address, port v2net.Port, callback ConnectionHandle
 	case settings.IsCapableOf(StreamConnectionTypeRawTCP):
 		listener, err = RawTCPListenFunc(address, port)
 	default:
+		log.Error("Internet|Listener: Unknown stream type: ", settings.Type)
 		err = ErrUnsupportedStreamType
 	}
 
 	if err != nil {
+		log.Warning("Internet|Listener: Failed to listen on ", address, ":", port)
 		return nil, err
 	}
 
@@ -70,11 +72,10 @@ func (this *TCPHub) start() {
 
 		if err != nil {
 			if this.accepting {
-				log.Warning("Listener: Failed to accept new TCP connection: ", err)
+				log.Warning("Internet|Listener: Failed to accept new TCP connection: ", err)
 			}
 			continue
 		}
-		log.Info("Handling connection from ", conn.RemoteAddr())
 		go this.connCallback(conn)
 	}
 }