Skip to content

Commit

Permalink
Remove some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jacksonrakena committed Dec 11, 2023
1 parent efa3a8c commit e412657
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
3 changes: 1 addition & 2 deletions Common/Networking/Core/PromulManager.Socket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ private bool BindInternal(Socket socket, IPEndPoint ep)
try
{
socket.Bind(ep);
NetDebug.Write(NetLogLevel.Trace, $"[B]Successfully binded to port: {((IPEndPoint)socket.LocalEndPoint).Port}, AF: {socket.AddressFamily}");


//join multicast
if (ep.AddressFamily == AddressFamily.InterNetworkV6)
{
Expand Down
7 changes: 0 additions & 7 deletions Common/Networking/Core/PromulManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ private void ProcessNtpRequests(long elapsedMilliseconds)

if (request.Result == ConnectionRequestResult.RejectForce)
{
NetDebug.Write(NetLogLevel.Trace, "[NM] Peer connect reject force.");
if (data is { Array: not null, Count: > 0 })
{
var shutdownPacket = NetworkPacket.FromProperty(PacketProperty.Disconnect, data.Count);
Expand Down Expand Up @@ -373,7 +372,6 @@ private void ProcessNtpRequests(long elapsedMilliseconds)
peer = await PeerBase.AcceptAsync(this, request, GetNextPeerId());
AddPeer(peer);
if (OnPeerConnected != null) await OnPeerConnected(peer);
NetDebug.Write(NetLogLevel.Trace, $"[NM] Received peer connection Id: {peer.ConnectTime}, EP: {peer.EndPoint}");
}
}

Expand Down Expand Up @@ -424,10 +422,6 @@ private async Task ProcessConnectRequest(
connRequest.ConnectionNumber = (byte)((peer.ConnectionNumber + 1) % NetConstants.MaxConnectionNumber);
//To reconnect peer
}
else
{
NetDebug.Write($"ConnectRequest Id: {connRequest.ConnectionTime}, EP: {remoteEndPoint}");
}

ConnectionRequest req;
lock (_connectionRequests)
Expand All @@ -440,7 +434,6 @@ private async Task ProcessConnectRequest(
req = new ConnectionRequest(remoteEndPoint, connRequest, this);
_connectionRequests.Add(remoteEndPoint, req);
}
NetDebug.Write($"[NM] Creating request event: {connRequest.ConnectionTime}");
if (OnConnectionRequest != null) await OnConnectionRequest(req);
}

Expand Down
1 change: 0 additions & 1 deletion Common/Networking/Peers/OutgoingPeer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ internal bool ProcessConnectionAccepted(NetConnectAcceptPacket packet)
ConnectionNumber = packet.ConnectionNumber;
RemoteId = packet.PeerId;

NetDebug.Write(NetLogLevel.Trace, "[NC] Received connection accept");
Interlocked.Exchange(ref _timeSinceLastPacket, 0);
ConnectionState = ConnectionState.Connected;
return true;
Expand Down
2 changes: 0 additions & 2 deletions Common/Networking/Peers/PeerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ internal static async Task<OutgoingPeer> ConnectToAsync(PromulManager manager, I
var peer = new OutgoingPeer(manager, remote, id, time, connectionNumber, data);

await peer.SendConnectionRequestAsync();
NetDebug.Write(NetLogLevel.Trace, $"[CC] Attempting connection to {peer.Id} at {peer.ConnectTime}");
return peer;
}

Expand All @@ -251,7 +250,6 @@ internal static async Task<IncomingPeer> AcceptAsync(PromulManager promulManager

await peer.SendAcceptedConnectionAsync();

NetDebug.Write(NetLogLevel.Trace, $"[CC] Accepted connection from {peer.Id}: {peer.ConnectTime}");
return peer;
}

Expand Down

0 comments on commit e412657

Please sign in to comment.