Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Commit

Permalink
Gracefully fallback to Netty NioEventLoop after any error in using Ep…
Browse files Browse the repository at this point in the history
…ollEventLoop
  • Loading branch information
merlimat committed Sep 22, 2016
1 parent 5be50dd commit 8982635
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,10 @@ static EventLoopGroup getDefaultEventLoopGroup() {
if (SystemUtils.IS_OS_LINUX) {
try {
return new EpollEventLoopGroup(numThreads, threadFactory);
} catch (UnsatisfiedLinkError e) {
} catch (Throwable t) {
if (LOG.isDebugEnabled()) {
LOG.debug("Could not use Netty Epoll event loop: {}", t.getMessage());
}
return new NioEventLoopGroup(numThreads, threadFactory);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ class BookieNettyServer {
if (SystemUtils.IS_OS_LINUX) {
try {
eventLoopGroup = new EpollEventLoopGroup(numThreads, threadFactory);
} catch (UnsatisfiedLinkError e) {
} catch (Throwable t) {
if (LOG.isDebugEnabled()) {
LOG.debug("Could not use Netty Epoll event loop for bookie server: {}", t.getMessage());
}
eventLoopGroup = new NioEventLoopGroup(numThreads, threadFactory);
}
} else {
Expand Down

0 comments on commit 8982635

Please sign in to comment.