Пример #1
0
        /// <summary>
        /// Drops a client from the monitor.
        /// <p/>This will lock the <seealso cref="Client"/> list of the <seealso cref="Device"/> running <var>client</var>. </summary>
        /// <param name="client"> </param>
        /// <param name="notify"> </param>
        internal void dropClient(Client client, bool notify)
        {
            lock (this)
            {
                if (mInstance == null)
                {
                    return;
                }

                lock (mClientList)
                {
                    if (mClientList.Remove(client) == false)
                    {
                        return;
                    }
                }
                client.close(notify);
                broadcast(CLIENT_DISCONNECTED, client);

                /*
                 * http://forum.java.sun.com/thread.jspa?threadID=726715&start=0
                 * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5073504
                 */
                wakeup();
            }
        }
Пример #2
0
        /// <summary>
        /// Drops a client from the monitor.
        /// <p/>This will lock the <seealso cref="Client"/> list of the <seealso cref="Device"/> running <var>client</var>. </summary>
        /// <param name="client"> </param>
        /// <param name="notify"> </param>
        internal void dropClient(Client client, bool notify)
        {
            lock (this)
            {
                if (mInstance == null)
                {
                    return;
                }

                lock (mClientList)
                {
                    if (mClientList.Remove(client) == false)
                    {
                        return;
                    }
                }
                client.close(notify);
                broadcast(CLIENT_DISCONNECTED, client);

                /*
             * http://forum.java.sun.com/thread.jspa?threadID=726715&start=0
             * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5073504
             */
                wakeup();
            }
        }