mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Refs codership/wsrep-lib#18 Small fixups
- fixed node ID assertion in on_connect() method, fixed "sanity checks" to allow reconnection to primary component - fixed code duplication in on_view() method
This commit is contained in:
@ -347,9 +347,12 @@ namespace
|
||||
assert(app_ctx);
|
||||
wsrep::server_state& server_state(
|
||||
*reinterpret_cast<wsrep::server_state*>(app_ctx));
|
||||
assert(server_state.id().is_undefined());
|
||||
wsrep::view view(view_from_native(*view_info, server_state.id()));
|
||||
assert(view.own_index() >= 0);
|
||||
assert(// first connect
|
||||
server_state.id().is_undefined() ||
|
||||
// reconnect to primary component
|
||||
server_state.id() == view.members()[view.own_index()].id());
|
||||
try
|
||||
{
|
||||
server_state.on_connect(view);
|
||||
|
Reference in New Issue
Block a user