<p></p>
<blockquote>
<blockquote>
<p>If you try to establish a new connection before sock_tcp_disconnect was finisched, the only TCB that could accept the connection is still in use.</p>
</blockquote>
<p>How do I know <code>sock_tcp_disconnect()</code> has finished? Shouldn't it just block?<br>
And since I kill the other half of the connection, I don't expect any response (unless Linux is taking care of this).</p>
</blockquote>
<p>Yes it blocks. Internally it tries to close the connection. If the other side doesn't send anymore it still has to wait two minutes before it is unblocked. This has something todo with slow roundtrip times from the early internet. So if you try to open a new connection before sock_tcp_disconnect finished it must fail.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16494#issuecomment-895947775">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYHTDOPNXAR77NOGUFTT4EDX3ANCNFSM45KSNSZA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email">Android</a>.<img src="https://github.com/notifications/beacon/ABE7WYASGRV6H7LFOEJVIL3T4EDX3A5CNFSM45KSNSZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGVTRH7Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16494#issuecomment-895947775",
"url": "https://github.com/RIOT-OS/RIOT/pull/16494#issuecomment-895947775",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>