fix: Adds more NetState dumping for debug (#1795)
This commit is contained in:
parent
21c5e46565
commit
ccad915464
2 changed files with 10 additions and 30 deletions
|
|
@ -26,13 +26,13 @@ public static class DumpNetStates
|
|||
|
||||
public static void DumpNetStatesCommand(CommandEventArgs args)
|
||||
{
|
||||
using var file = new StreamWriter("netstatedump.csv");
|
||||
using var file = new StreamWriter($"netstatedump-{Core.Now:yyyy-M-d-HH-mm-ss}_{Core.TickCount}.csv");
|
||||
|
||||
file.WriteLine("NetState, RecvTask, SendTask, ProtocolState, ParserState");
|
||||
file.WriteLine("NetState, ConnectedOn, NextActivityCheck, SocketConnected, ProtocolState, ParserState");
|
||||
|
||||
foreach (var ns in NetState.Instances)
|
||||
{
|
||||
file.WriteLine($"{ns}, {ns._protocolState}, {ns._parserState}");
|
||||
file.WriteLine($"{ns}, {ns.ConnectedOn}, {ns.NextActivityCheck}, {ns.Connection.Connected}, {ns._protocolState}, {ns._parserState}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue