|
@@ -110,6 +110,9 @@ public class UdpKernel extends AbstractKernel
|
|
thread.close();
|
|
thread.close();
|
|
writer.shutdown();
|
|
writer.shutdown();
|
|
thread = null;
|
|
thread = null;
|
|
|
|
+
|
|
|
|
+ // Need to let any caller waiting for a read() wakeup
|
|
|
|
+ wakeupReader();
|
|
} catch( IOException e ) {
|
|
} catch( IOException e ) {
|
|
throw new KernelException( "Error closing host connection:" + address, e );
|
|
throw new KernelException( "Error closing host connection:" + address, e );
|
|
}
|
|
}
|
|
@@ -169,16 +172,8 @@ public class UdpKernel extends AbstractKernel
|
|
log.log( Level.FINE, "Socket endpoints size:{0}", socketEndpoints.size() );
|
|
log.log( Level.FINE, "Socket endpoints size:{0}", socketEndpoints.size() );
|
|
|
|
|
|
addEvent( EndpointEvent.createRemove( this, p ) );
|
|
addEvent( EndpointEvent.createRemove( this, p ) );
|
|
-
|
|
|
|
- // If there are no pending messages then add one so that the
|
|
|
|
- // kernel-user knows to wake up if it is only listening for
|
|
|
|
- // envelopes.
|
|
|
|
- if( !hasEnvelopes() ) {
|
|
|
|
- // Note: this is not really a race condition. At worst, our
|
|
|
|
- // event has already been handled by now and it does no harm
|
|
|
|
- // to check again.
|
|
|
|
- addEnvelope( EVENTS_PENDING );
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ wakeupReader();
|
|
}
|
|
}
|
|
|
|
|
|
protected void newData( DatagramPacket packet )
|
|
protected void newData( DatagramPacket packet )
|