Skip to content

Commit

Permalink
Merge pull request #487 from rhatlapa/findbugs-fix
Browse files Browse the repository at this point in the history
Fixing findbugs issue REC_CATCH_EXCEPTION
  • Loading branch information
stuartwdouglas committed Feb 15, 2017
2 parents cb0a53e + 2eb8fbc commit e0f2974
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -18,14 +18,14 @@

package io.undertow.protocols.ssl;

import io.undertow.UndertowLogger;
import io.undertow.connector.ByteBufferPool;
import org.xnio.ChannelListener;
import org.xnio.ChannelListeners;
import org.xnio.IoUtils;
import org.xnio.Option;
import org.xnio.OptionMap;
import org.xnio.Options;
import io.undertow.UndertowLogger;
import io.undertow.connector.ByteBufferPool;
import org.xnio.Sequence;
import org.xnio.SslClientAuthMode;
import org.xnio.StreamConnection;
Expand All @@ -36,7 +36,6 @@
import org.xnio.channels.AcceptingChannel;
import org.xnio.ssl.SslConnection;

import javax.net.ssl.SSLEngine;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
Expand All @@ -49,6 +48,7 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import javax.net.ssl.SSLEngine;

import static org.xnio._private.Messages.msg;

Expand Down Expand Up @@ -183,7 +183,7 @@ public UndertowSslConnection accept() throws IOException {
engine.setEnabledProtocols(finalList.toArray(new String[finalList.size()]));
}
return accept(tcpConnection, engine);
} catch (Exception e) {
} catch (IOException | RuntimeException e) {
IoUtils.safeClose(tcpConnection);
UndertowLogger.REQUEST_LOGGER.failedToAcceptSSLRequest(e);
return null;
Expand Down

0 comments on commit e0f2974

Please sign in to comment.