Example #1
0
        private void Handle(mask_spacket msg)
        {
            var mask = msg.Mask;

            l.Debug(msg.ToString());

            if (Bridge != null)
            {
                Bridge.SetJoinableTeams(mask);
                //l.Debug("Set mask -- got bridge!");
            }
            else
            {
                SpinWait.SpinUntil(() =>
                {
                    if (Bridge != null)
                    {
                        //l.Debug("Set mask -- got bridge!");
                        Bridge.SetJoinableTeams(mask);
                        return(true);
                    }
                    else
                    {
                        l.Trace("Set mask -- no bridge yet");
                        return(false);
                    }
                });
            }
        }
        private void Handle(mask_spacket msg)
        {
            var mask = msg.Mask;

            l.Debug(msg.ToString());

            if (Bridge != null)
            {
                Bridge.SetJoinableTeams(mask);
                //l.Debug("Set mask -- got bridge!");
            }
            else
            {
                SpinWait.SpinUntil(() =>
                    {
                        if (Bridge != null)
                        {
                            //l.Debug("Set mask -- got bridge!");
                            Bridge.SetJoinableTeams(mask);
                            return true;
                        }
                        else
                        {
                            l.Trace("Set mask -- no bridge yet");
                            return false;
                        }
                    });
            }
        }