<p>im close on a patch that fixes this, but im having trouble because WS and WSS are the same letters up till the last S.  Im not sure how to avoid the transport_fin call for WS as i basically need to look ahead.</p>

<p>here is my current diff <a href="https://gist.github.com/etamme/953cb286cb73b6a62216">https://gist.github.com/etamme/953cb286cb73b6a62216</a><br>
It you uncomment </p>

<pre><code>//transport_fin(VW_S_FIN, PROTO_WS);
</code></pre>

<p>It will fail to compile, but i tested it as is with WSS and got clean loose routing on a sequential request towards a WSS client.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/742#issuecomment-169135437">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcidorJti4GZsVjQQI8VSc3afKRLQ-ks5pXClVgaJpZM4G-_9C.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/742#issuecomment-169135437"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>