You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the values of RTT and bandwidth are stored in cache during the socket closing, see function bool CUDT::closeInternal() (core.cpp):
// Store current connection information.
CInfoBlock ib;
ib.m_iIPversion = m_PeerAddr.family();
CInfoBlock::convert(m_PeerAddr, ib.m_piIP);
ib.m_iRTT = m_iRTT;
ib.m_iBandwidth = m_iBandwidth;
m_pCache->update(&ib);
As a result, they can be used and extracted from cache only once the socket is closed. The socket closing happens at the background and takes some time to execute. The values from cache can be used when creating another socket with the same target IP if only the previous one has been closed already.
This leads to the following problems:
We might need to create several sockets with the same target IP one after another (almost in parallel) and it's reasonable to use the values from cache from one of the already created and functioning sockets. However, this isn't possible with the current implementation.
For resumed connection, while the new socket is being created, the previous one is probably still not closed. As a result, we have no cache or some old data stored from the previous sessions (in case of multiple reconnections).
To Reproduce
See PR #1957, test case 2.1 for the reproduction steps and screenshots.
The text was updated successfully, but these errors were encountered:
My proposal: record the values every time ACK is coming in. Finding the right place for recording it at the moment of closing could be non-trivial - at least when distinguishing closing on the application, connection closed by SHUTDOWN and connection broken by timeout. This would be also the only way to make it available for parallel connection over the same network pathway.
Describe the Bug
Currently, the values of RTT and bandwidth are stored in cache during the socket closing, see function
bool CUDT::closeInternal()
(core.cpp):As a result, they can be used and extracted from cache only once the socket is closed. The socket closing happens at the background and takes some time to execute. The values from cache can be used when creating another socket with the same target IP if only the previous one has been closed already.
This leads to the following problems:
To Reproduce
See PR #1957, test case 2.1 for the reproduction steps and screenshots.
The text was updated successfully, but these errors were encountered: