endpoint.close();
SelectionKey key = (SelectionKey)iter.next(); if (key==null) continue; EndPoint endpoint = (EndPoint)key.attachment(); if (endpoint!=null) { try { endpoint.close(); } catch(IOException e) { Log.ignore(e); } }
        void stop() throws Exception        {            wakeup();            Thread.yield();                        synchronized (this)            {                Iterator iter =_selector.keys().iterator();                while (iter.hasNext())                {                    SelectionKey key = (SelectionKey)iter.next();                    if (key==null)                        continue;                    EndPoint endpoint = (EndPoint)key.attachment();                    if (endpoint!=null)                    {                        try                        {                            endpoint.close();                        }                        catch(IOException e)                        {                            Log.ignore(e);                        }                    }                }                _idleTimeout.cancelAll();                _retryTimeout.cancelAll();                try                {                    if (_selector != null)                        _selector.close();                }                catch (IOException e)                {                    Log.ignore(e);                }                 _selector=null;            }        }