I try to retrieve windows tcp table while tcp connections are intensively established in parallel.
In code example below (#1) one task is establishing many tcp connections and not releasing them, eventually leading to SocketException, and the other is reading tcp table with iphlpapi in parallel. When SocketException in first task occurs, all previous connections are released and same cycle repeats.
So, on my machine tcp table is read well and no exceptions are thrown. But on other set of machines same code makes GetExtendedTcpTable return undocumented error code -1073741823, making code throw on line 98.
What is this error code and why does it occur only at specific machines?
The issue is not googling well. I found only one related issue raised (#2) and there are no comments explaining such error code origin.
Also form is not allowing me use links, so here are references.
#1 https://github.com/paatrofimov/tcp-table-error-demo/blob/master/Program.cs
#2 https://github.com/giampaolo/psutil/issues/1294