Cleanup unnecessary code

This commit is contained in:
MottoX 2018-04-11 16:11:37 +08:00
parent 379a825182
commit 65e1cae2de
2 changed files with 3 additions and 6 deletions

View File

@ -84,11 +84,8 @@ public class NioReactor {
/**
* Starts the reactor event loop in a new thread.
*
* @throws IOException
* if any I/O error occurs.
*/
public void start() throws IOException {
public void start() {
reactorMain.execute(() -> {
try {
LOGGER.info("Reactor started, waiting for events...");

View File

@ -98,9 +98,9 @@ public class NioServerSocketChannel extends AbstractNioChannel {
*/
@Override
public void bind() throws IOException {
((ServerSocketChannel) getJavaChannel()).socket().bind(
getJavaChannel().socket().bind(
new InetSocketAddress(InetAddress.getLocalHost(), port));
((ServerSocketChannel) getJavaChannel()).configureBlocking(false);
getJavaChannel().configureBlocking(false);
LOGGER.info("Bound TCP socket at port: {}", port);
}