Only try to close active datagram sessions

This commit is contained in:
nathan 2018-03-29 23:07:23 +02:00
parent eaabd91080
commit 882b65ccf1

View File

@ -129,7 +129,9 @@ class SessionManager extends ChannelInboundHandlerAdapter {
// We make a copy of this b/c of concurrent modification, in the event this is closed BEFORE the child-channels are closed
ArrayList<DatagramSessionChannel> channels = new ArrayList<DatagramSessionChannel>(datagramChannels.values());
for (DatagramSessionChannel datagramSessionChannel : channels) {
datagramSessionChannel.close();
if (datagramSessionChannel.isActive()) {
datagramSessionChannel.close();
}
}
}