Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Commented Feature: Add cancellation support to websocket APIs (especially receive task) [177]

$
0
0
Currently, websocket APIs do not take cancellation token.
Initiating a receive returns a task that completes when a message is received. If user wishes to cancel this operation, it is not possible right now, unless they close the websocket client : in which case the receive will throw an exception.
Comments: Using 2.1.0 here. I could not even catch the exception with websocket_exception nor "..." When the receive is ongoing and the close is called, the rest sdk internal code crashes without any chance to catch the exception. Stack trace of the error: cpprest120d_2_1.dll!Concurrency::details::_ExceptionHolder::~_ExceptionHolder(void) Unknown cpprest120d_2_1.dll!Concurrency::details::_ExceptionHolder::`scalar deleting destructor'(unsigned int) Unknown cpprest120d_2_1.dll!std::_Ref_count_obj<struct Concurrency::details::_ExceptionHolder>::_Destroy(void) Unknown > WebsocketsTesterCpp.exe!std::_Ref_count_base::_Decref() Line 118 C++ WebsocketsTesterCpp.exe!std::_Ptr_base<Concurrency::details::_ExceptionHolder>::_Decref() Line 344 C++ WebsocketsTesterCpp.exe!std::shared_ptr<Concurrency::details::_ExceptionHolder>::~shared_ptr<Concurrency::details::_ExceptionHolder>() Line 611 C++ WebsocketsTesterCpp.exe!Concurrency::details::_Task_impl_base::~_Task_impl_base() Line 1677 C++ WebsocketsTesterCpp.exe!Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::~_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >() Line 2367 C++ WebsocketsTesterCpp.exe!Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >::`scalar deleting destructor'(unsigned int) C++ WebsocketsTesterCpp.exe!std::_Ref_count_obj<Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Destroy() Line 944 C++ WebsocketsTesterCpp.exe!std::_Ref_count_base::_Decref() Line 118 C++ WebsocketsTesterCpp.exe!std::_Ptr_base<Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::_Decref() Line 344 C++ WebsocketsTesterCpp.exe!std::shared_ptr<Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >::~shared_ptr<Concurrency::details::_Task_impl<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > >() Line 611 C++ WebsocketsTesterCpp.exe!Concurrency::details::_PPLTaskHandle<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>::_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>,Concurrency::details::_ContinuationTaskHandleBase>::~_PPLTaskHandle<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>::_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>,Concurrency::details::_ContinuationTaskHandleBase>() Line 1588 C++ WebsocketsTesterCpp.exe!Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>::_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>::~_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>() Line 3769 C++ WebsocketsTesterCpp.exe!Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>::_ContinuationTaskHandle<web::experimental::web_sockets::client::websocket_incoming_message,std::basic_string<char,std::char_traits<char>,std::allocator<char> >,Concurrency::task<std::basic_string<char,std::char_traits<char>,std::allocator<char> > > <lambda>(Concurrency::task<web::experimental::web_sockets::client::websocket_incoming_message>),std::integral_constant<bool,1>,Concurrency::details::_TypeSelectorAsyncTask>::`scalar deleting destructor'(unsigned int) C++ msvcr120d.dll!0fbc72bc() Unknown [Frames below may be incorrect and/or missing, no symbols loaded for msvcr120d.dll] msvcr120d.dll!0fbfe801() Unknown msvcr120d.dll!0fbc7e8a() Unknown msvcr120d.dll!0fbd75b3() Unknown msvcr120d.dll!0fbf9ac1() Unknown msvcr120d.dll!0fbd4257() Unknown msvcr120d.dll!0fbd4123() Unknown msvcr120d.dll!0fbd2bae() Unknown msvcr120d.dll!0fc00f94() Unknown kernel32.dll!76b0919f() Unknown ntdll.dll!7718a22b() Unknown ntdll.dll!7718a201() Unknown Suggestions?

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>