<p></p>
<p>Hi <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/sergey-safarov/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sergey-safarov">@sergey-safarov</a>,</p>
<p>Thanks for reaching out. Do you have a reproduction case for this, or is it only in production that you see the issue? I'm not familiar with the semantics of <code>recv(MSG_PEEK)</code> on outbound connections. I didn't know this code was being called for outbound as well.</p>
<p>I've spent some time last night and this morning looking through this, and I can't spot anything out of place immediately. One thing though: if this is an outbound connection being setup, why is <code>state == S_CONN_ACCEPT</code>, instead of <code>S_CONN_INIT</code>, which is supposed to be the initial invalid state? Also, I can see in your backtrace that port is <code>32519</code>. Wouldn't that make it an inbound connection?</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/kamailio/kamailio/issues/2658#issuecomment-790405970">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZJSDX7ZBEF7E6534Z3TB44HRANCNFSM4YRFWH2Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNCGCOWBVTCT7MNSZDTB44HRA5CNFSM4YRFWH22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOF4OKGUQ.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/kamailio/kamailio/issues/2658#issuecomment-790405970",
"url": "https://github.com/kamailio/kamailio/issues/2658#issuecomment-790405970",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>