Skip to content

Commit

Permalink
Merge pull request #17102 from mychoxin/yuanxin_print_log_if_add_even…
Browse files Browse the repository at this point in the history
…t_fail

msg/async: print error log if add_event fail

Reviewed-by: Pan Liu <liupan1111@gmail.com>
Reviewed-by: Jos Collin <jcollin@redhat.com>
  • Loading branch information
liewegas committed Sep 11, 2017
2 parents cfb13b3 + 52c4c13 commit 3b4a9d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/msg/async/Event.cc
Expand Up @@ -230,6 +230,8 @@ int EventCenter::create_file_event(int fd, int mask, EventCallbackRef ctxt)
// Actually we don't allow any failed error code, caller doesn't prepare to
// handle error status. So now we need to assert failure here. In practice,
// add_event shouldn't report error, otherwise it must be a innermost bug!
lderr(cct) << __func__ << " add event failed, ret=" << r << " fd=" << fd
<< " mask=" << mask << " original mask is " << event->mask << dendl;
assert(0 == "BUG!");
return r;
}
Expand Down

0 comments on commit 3b4a9d0

Please sign in to comment.