Different improvements

- catch all kinds of errors when selector binding fails
- pimped DefaultLabeler to support listeners
- added pagination capabilities to AbstractMessageRepository
This commit is contained in:
2017-09-13 08:06:06 +02:00
parent 273d229709
commit bf0c946c52
5 changed files with 91 additions and 53 deletions

View File

@ -318,7 +318,13 @@ class NioNetworkHandler : NetworkHandler, InternalContext.ContextHolder {
}
}
selector.close()
} catch (_: ClosedSelectorException) {
} catch (e: Exception) {
// There are various exceptions that may occur when the selector can't be bound:
// ClosedSelectorException, BindException, NullPointerException, SocketException,
// ClosedChannelException
// I'm not sure if I give a damn, or what to do about it. Crashing the application
// isn't nice though.
LOG.error(e.message, e)
}
})
}