It has nothing to do with a countdown timer, and after a whole day of digging deep into net talk code I think I found the problem and a solution. In my testing I noticed that every new page request created a new session, and that every new session had the same sessionID as the original session.
This was because _FindSessionID was creating new sessions, because _ParseSettings was returning 0.
Turning on your traces gave me:
[2308] [st] [netTalk][thread=3] PARSESETTINGS 0 pStart=420 pEnd=670 __RequestVerificationToken=tIZewJKJu8rQ79xMBoFc4fDtVYc9iVRaeHSiRCl7-Nixx0xG2-Dxp59wc7RT1FHyutVlQ-TmeWIQ8U4NrbEJ6JgoW0PC5XEu1qPJHVQyCEAWhWR2fyIcX4THkfAtgH1Nl6SNakpbnC8_Hcxt0AC0LQ2; SESSIONID=Inv91ppX89pXEUZGT0cCNqw3fXWP85; x-TabID=feamcabtu4436gqilik9
[2308] [st] [netTalk][thread=3] PARSESETTINGS LOOP pStart=420 pEnd=669 __RequestVerificationToken=tIZewJKJu8rQ79xMBoFc4fDtVYc9iVRaeHSiRCl7-Nixx0xG2-Dxp59wc7RT1FHyutVlQ-TmeWIQ8U4NrbEJ6JgoW0PC5XEu1qPJHVQyCEAWhWR2fyIcX4THkfAtgH1Nl6SNakpbnC8_Hcxt0AC0LQ2; SESSIONID=Inv91ppX89pXEUZGT0cCNqw3fXWP85; x-TabID=feamcabtu4436gqilik9 SEP=; x=179 p_Encoded=0
[2308] [st] [netTalk][thread=3] PARSESETTINGS LOOP pStart=599 pEnd=669 SESSIONID=Inv91ppX89pXEUZGT0cCNqw3fXWP85; x-TabID=feamcabtu4436gqilik9 SEP=; x=42 p_Encoded=0
[2308] [st] [netTalk][thread=3] PARSESETTINGS LOOP pStart=641 pEnd=669 x-TabID=feamcabtu4436gqilik9 SEP=; x=0 p_Encoded=0
The key here is that _AddSetting handled "x-TabID" after "SESSIONID" as it only return 1 on sessions ids. I changed the loop in _ParseSettings to:
loop while p_end >= p_start
x = instring (clip(sep),p_settings[p_start : p_end],1,1)
self._trace('PARSESETTINGS LOOP pStart=' & p_Start & ' pEnd=' & p_End & ' ' & clip(p_settings[p_start : p_end]) & ' SEP=' & clip(sep) & ' x=' & x & ' p_Encoded=' & p_Encoded)
if x = 0
if p_Encoded = Net:Inline
done = self._AddSetting(p_settings[p_Start : p_End],p_OnlySessionID,p_Plus)
else
done = self._ParsePart(p_settings,p_Start,p_End,p_OnlySessionID)
end
if p_OnlySessionID AND (Self.BrowserTabId and Self.SessionID)
done = 1
end
break
else
if p_Encoded = Net:Inline
done = self._AddSetting(p_settings [p_start : p_start-1+x-1],p_OnlySessionID,p_Plus)
else
done = self._ParsePart(p_settings,p_start,p_start-1+x-1,p_OnlySessionID)
end
p_start += x+y-1
end
!if done then break. !! removed in 8.67. Need to parse out SessionID and possible TabId
If p_OnlySessionID
If IsTabId = 0
If done then break.
Else
if Self.BrowserTabId and Self.SessionID
done = 1
BREAK
END
End
End
end
Now everything is working exactly as I expect it to. However this is by far the deepest I've gone into NetTalk code so if you could have a look at it. Also these changes won't survive next time I update net talk, so a more permanent solution is needed.
Thanks
Matthew