<div dir="ltr">I had a problem with this method to, and to fix it, i did some loop into <span style="font-family:Tahoma;font-size:16px">Read method when calls the readsome to keep reading until he gets some return from it or my number of tries expires.</span><div><span style="font-family:Tahoma;font-size:16px"><br></span></div><div><span style="font-family:Tahoma;font-size:16px">I Also tried to increment the </span><span style="font-family:Tahoma;font-size:16px">timeoutMilliseconds variable but didn't solve anything, so i did this:</span></div><div><span style="font-family:Tahoma;font-size:16px"><br></span></div><div><span style="font-family:Tahoma;font-size:16px"><br></span></div><div><span style="font-family:Tahoma;font-size:16px">Read(){</span></div><div><span style="font-family:Tahoma;font-size:16px">   int maxtries = 10; // u can put any value u want;</span></div><div><span style="font-family:Tahoma;font-size:16px">   int numTries = 0;</span></div><div><span style="font-family:Tahoma;font-size:16px">   (Don't remember the type of object) result = null;</span></div><div><span style="font-family:Tahoma;font-size:16px"><br></span></div><div><span style="font-family:Tahoma;font-size:16px">   While (</span><span style="font-family:Tahoma;font-size:16px">result</span><span style="font-family:Tahoma;font-size:16px"> == null && numTries < </span><span style="font-family:Tahoma;font-size:16px">maxtries </span><span style="font-family:Tahoma;font-size:16px">)</span></div><div><span style="font-family:Tahoma;font-size:16px">   {</span></div><div><span style="font-family:Tahoma;font-size:16px">         try</span></div><div><span style="font-family:Tahoma;font-size:16px">         {</span></div><div><span style="font-family:Tahoma;font-size:16px">             result</span><span style="font-family:Tahoma;font-size:16px">  = ReadSome();</span><span style="font-family:Tahoma;font-size:16px"><br></span></div><div><span style="font-family:Tahoma;font-size:16px">         }catch(Exception)</span></div><div><span style="font-family:Tahoma;font-size:16px">         {</span></div><div><span style="font-family:Tahoma;font-size:16px">   // u can decide what to do with de exception here.</span></div><div><span style="font-family:Tahoma;font-size:16px">         }</span></div><div><span style="font-family:Tahoma;font-size:16px"><br></span></div><div><span style="font-family:Tahoma;font-size:16px">         numTries ++;</span></div><div><span style="font-family:Tahoma;font-size:16px">   }</span></div><div><span style="font-family:Tahoma;font-size:16px"><br></span></div><div><span style="font-family:Tahoma;font-size:16px">on my code, i did nothing to treat the exception right now, but i might implement something to deal with it.</span></div><div><span style="font-family:Tahoma;font-size:16px"><br></span></div><div><font face="Tahoma"><span style="font-size:16px">My Problem was related to my network that is really super slow causing the QF to throw a timeout exception because of it.</span></font></div><div><font face="Tahoma"><span style="font-size:16px"><br></span></font></div><div><font face="Tahoma"><span style="font-size:16px">Sorry for my bad english, </span></font></div><div><font face="Tahoma"><span style="font-size:16px"><br></span></font></div><div><font face="Tahoma"><span style="font-size:16px">I Hope that helps you.</span></font></div><div><span style="font-family:Tahoma;font-size:16px"><br></span></div><div><span style="font-family:Tahoma;font-size:16px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-01-25 14:12 GMT-02:00 Francis Gingras <span dir="ltr"><<a href="mailto:francis@tradeintegration.com" target="_blank">francis@tradeintegration.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>
<span style="font-family:'Tahoma';font-size:12pt">Hi,<br>
<br>
Recently I have started seeing this issue where QF/n 1.5 does not reconnect on its own after the counterparty drops the connection. Any ideas?<br>
<br>
20160124-22:35:34.815 : Created session<br>
20160124-22:35:34.830 : Connecting to 127.0.0.1 on port 1234<br>
20160124-22:35:34.835 : Connection succeeded<br>
20160124-22:35:34.966 : Session reset: ResetSeqNumFlag<br>
20160124-22:35:34.970 : Initiated logon request<br>
20160124-22:35:44.839 : Session FIX.4.4:ME->THEM:ORDER disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host<br>
   at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)<br>
   at QuickFix.SocketInitiatorThread.Read()<br>
<br>
-> here I get an <span style="font-family:'Consolas'">OnLogout event and nothing after.<br>
<br>
<span style="font-family:'Tahoma'">My QF settings are:<br>
<br>
[DEFAULT]<br>
ConnectionType=initiator<br>
BeginString=FIX.4.4<br>
ReconnectInterval=30<br>
FileStorePath=C:\Trading\Fix\Store<br>
FileLogPath=C:\Trading\Fix<br>
HeartBtInt=30<br>
LogonTimeout=61<br>
TimeZone=Eastern Standard Time<br>
IgnorePossDupResendRequests=Y<br>
StartTime=17:30:00<br>
EndTime=17:30:00<br>
StartDay=sun<br>
EndDay=fri<br>
UseDataDictionary=Y<br>
DataDictionary=C:\Trading\FIX44.xml<br>
ValidateUserDefinedFields=N<br>
ValidateFieldsHaveValues=N<br>
ValidateFieldsOutOfOrder=N<br>
ResetOnLogout=N<br>
ResetOnDisconnect=N<br>
CheckLatency=N<br>
RequiresOrigSendingTime=N<br>
HttpAcceptPort=8071<br>
PersistMessages=Y<br>
[SESSION]<br>
SenderCompID=ME<br>
TargetCompID=THEM<br>
SessionQualifier=ORDER<br>
SocketConnectHost=127.0.0.1<br>
SocketConnectPort=1234<br>
<br>
Thanks,<br>
<br>
Francis Gingras</span></span></span></div><br>_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" rel="noreferrer" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><br>
<br></blockquote></div><br></div>