msg/Messenger: do not crash on unhandled message

This is just polite.

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-02-12 13:52:09 -08:00
parent a88f9bea54
commit 1e68ccf6aa
2 changed files with 5 additions and 5 deletions

View File

@ -100,6 +100,7 @@ OPTION(ms_initial_backoff, OPT_DOUBLE, .2)
OPTION(ms_max_backoff, OPT_DOUBLE, 15.0)
OPTION(ms_nocrc, OPT_BOOL, false)
OPTION(ms_die_on_bad_msg, OPT_BOOL, false)
OPTION(ms_die_on_unexpected_msg, OPT_BOOL, false)
OPTION(ms_dispatch_throttle_bytes, OPT_U64, 100 << 20)
OPTION(ms_bind_ipv6, OPT_BOOL, false)
OPTION(ms_bind_port_min, OPT_INT, 6800)

View File

@ -552,11 +552,10 @@ public:
p++)
if ((*p)->ms_dispatch(m))
return;
std::ostringstream oss;
oss << "ms_deliver_dispatch: fatal error: unhandled message "
<< m << " " << *m << " from " << m->get_source_inst();
dout_emergency(oss.str());
assert(0);
lsubdout(cct, ms, 0) << "ms_deliver_dispatch: unhandled message " << m << " " << *m << " from "
<< m->get_source_inst() << dendl;
assert(!cct->_conf->ms_die_on_unexpected_msg);
m->put();
}
/**
* Notify each Dispatcher of a new Connection. Call