IQFeed.CSharpApiClient icon indicating copy to clipboard operation
IQFeed.CSharpApiClient copied to clipboard

IQFeed client causes app crash

Open samushenkov opened this issue 3 years ago • 3 comments

#122 issue can cause app crash if one uses GetIntervalMessagesWithRequestId api method.

SocketAsyncEventArgs.Completed event handler doesn't have any try-catch blocks. That is why exception thrown by ParseWithRequestId crashes all application.

samushenkov avatar Apr 23 '21 09:04 samushenkov

@samushenkov just by curiosity, why are you still using requestId?

mathpaquette avatar Apr 23 '21 10:04 mathpaquette

Actually I am not, it was a first attempt to solve an issue with candles received from previous request. Just thought that there is some logic that filters messages based on request id.

samushenkov avatar Apr 23 '21 10:04 samushenkov

@samushenkov we still dont use TryParse for RequestId thats the reason why you got the exception. https://github.com/mathpaquette/IQFeed.CSharpApiClient/blob/master/src/IQFeed.CSharpApiClient/Lookup/Historical/HistoricalMessageHandler.cs#L27

mathpaquette avatar Apr 23 '21 11:04 mathpaquette