protected void StateChangeHandler(Node n, Node.ConnectionState state) { if(state == Node.ConnectionState.Connected) { lock(_sync) { _allow_localcons = true; } } else if(state == Node.ConnectionState.Leaving) { lock(_sync) { _active = false; } } }