aeron-driver/src/main/java/io/aeron/driver/media/UdpChannelTransport.java
public void close()
    {
        if (!isClosed)
        {
            isClosed = true;
            try
            {
                if (null != selectionKey)
                {
                    selectionKey.cancel();
                }

                if (null != transportPoller)
                {
                    transportPoller.cancelRead(this);
                    transportPoller.selectNowWithoutProcessing();
                }

                if (null != sendDatagramChannel)
                {
                    sendDatagramChannel.close();
                }

                if (receiveDatagramChannel != sendDatagramChannel && null != receiveDatagramChannel)
                {
                    receiveDatagramChannel.close();
                }

                if (null != transportPoller)
                {
                    transportPoller.selectNowWithoutProcessing();
                }
            }
            catch (final IOException ex)
            {
                errorLog.record(ex);
            }
        }
    }
public void close()
    {
        if (!isClosed)
        {
            isClosed = true;
            try
            {
                if (null != selectionKey)
                {
                    selectionKey.cancel();
                }

                if (null != transportPoller)
                {
                    transportPoller.cancelRead(this);
                    transportPoller.selectNowWithoutProcessing();
                }

                if (null != sendDatagramChannel)
                {
                    sendDatagramChannel.close();
                }

                if (receiveDatagramChannel != sendDatagramChannel && null != receiveDatagramChannel)
                {
                    receiveDatagramChannel.close();
                }

                if (null != transportPoller)
                {
                    transportPoller.selectNowWithoutProcessing();
                }
            }
            catch (final IOException ex)
            {
                errorLog.record(ex);
            }
        }
    }
public void close ( ) { if ( ! isClosed ) { isClosed = true ; try { if ( null != selectionKey ) { selectionKey . cancel ( ) ; } if ( null != transportPoller ) { transportPoller . cancelRead ( this ) ; transportPoller . selectNowWithoutProcessing ( ) ; } if ( null != sendDatagramChannel ) { sendDatagramChannel . close ( ) ; } if ( receiveDatagramChannel != sendDatagramChannel && null != receiveDatagramChannel ) { receiveDatagramChannel . close ( ) ; } if ( null != transportPoller ) { transportPoller . selectNowWithoutProcessing ( ) ; } } catch ( final IOException ex ) { errorLog . record ( ex ) ; } } }
Close transport, canceling any pending read operations and closing channel
Close transport canceling any pending read operations and closing channel