fix cores: don't use promise in websocket when failure, use FC_CAPTURE_AND_LOG... #25

Merged
pavel.baykov merged 4 commits from bug/issue330 into latest-fc 2022-04-05 22:46:49 +00:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 30296957f7 - Show all commits

View file

@ -27,6 +27,7 @@ namespace fc {
}
void promise_base::cancel(const char* reason /* = nullptr */){
synchronized(_spin_yield)
// wlog("${desc} canceled!", ("desc", _desc? _desc : ""));
_canceled = true;
#ifndef NDEBUG

View file

@ -596,7 +596,12 @@ namespace fc {
else if( timeout_time != time_point::min() )
{
// there may be tasks that have been canceled we should filter them out now
// rather than waiting...
// rather than waiting...
//
if (current->canceled){
return;
}
/* This bit is kind of sloppy -- this wait was originally implemented as a wait