Profile Picture

RE crashes on IQFeed disconnection.

Posted By smersh 3 Years Ago
Message
Posted Friday September 26 2014
I've recently started using IQFeed and find that I when it loses connection (due to being logged-in to elsewhere), RE will throw an exception and after clicking OK, it crashes without saving the LiveOpenPositions.xml which is very bad.

Is there a way to catch this exception or better still have it attempt to reconnect?


Posted Friday September 26 2014
Can you post the stack trace of the exception?

To mitigate this, you can periodically call PositionManager.SaveOpenPositions() in your system to have a more recent version of LiveOpenPositions which you can use if RightEdge crashes.

Thanks,
Daniel
Posted Monday September 29 2014
Exception details are :


An exception of type System.Net.Sockets.SocketException was thrown.
An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
   at IQFeed.SocketReader.PrivateCallback(IAsyncResult ar) in \\FS1\Data\Dev\RightEdge\RightEdgePlugins\Build49\IQFeed\SocketReader.cs:line 33
   at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
   at System.Net.ContextAwareResult.CompleteCallback(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Net.ContextAwareResult.Complete(IntPtr userToken)
   at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
   at System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
   at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)


Edited: Monday September 29 2014 by smersh
Posted Sunday October 19 2014
This will be fixed in the next build.

Thanks,
Daniel
Posted Tuesday November 04 2014
Hi Daniel,

Will the fix be in RE or in the IQFeed plugin?
If in the plugin, may I have the changes so I can patch mine?

Thanks

Posted Tuesday November 04 2014
The fix is in the IQFeed plugin.  The source code is included in the RightEdge samples so you can get the changes from there to apply to your copy of the plugin.

Thanks,
Daniel
Posted Thursday December 11 2014
Hi Daniel,

If I take the IQFeed plugin code from b52 and compile it, will it run against b49?


Posted Thursday December 11 2014
You will need to make some minor changes to account for changes in the broker interface in build 52.

Thanks,
Daniel
Posted Thursday January 08 2015
Just FYI I merged the new (b52) plugin code with mine (b49) and it has fixed the problem.

thanks



Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems