diff options
Diffstat (limited to 'src/main/java/com/lumaserv')
-rw-r--r-- | src/main/java/com/lumaserv/bgp/BGPServer.java | 17 | ||||
-rw-r--r-- | src/main/java/com/lumaserv/bgp/BGPSession.java | 2 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/main/java/com/lumaserv/bgp/BGPServer.java b/src/main/java/com/lumaserv/bgp/BGPServer.java index 78ceee8..53f8af7 100644 --- a/src/main/java/com/lumaserv/bgp/BGPServer.java +++ b/src/main/java/com/lumaserv/bgp/BGPServer.java @@ -143,11 +143,11 @@ public class BGPServer implements Runnable { } } - public boolean connect(BGPSessionConfiguration config, String host) throws IOException { + public boolean connect(BGPSessionConfiguration config, String host) { return connect(config, host, 179); } - public boolean connect(BGPSessionConfiguration config, String host, int port) throws IOException { + public boolean connect(BGPSessionConfiguration config, String host, int port) { for (BGPSession session : sessions) { if (session.getConfiguration().equals(config)) { // Already connected @@ -155,15 +155,10 @@ public class BGPServer implements Runnable { } } - try { - BGPSession session = new BGPSession(this, config, host, port); - sessions.add(session); - session.getFsm().getCurrentState().automaticStart(); - return true; - } catch (IOException ex) { - ex.printStackTrace(); - throw(ex); - } + BGPSession session = new BGPSession(this, config, host, port); + sessions.add(session); + session.getFsm().getCurrentState().automaticStart(); + return true; } public void shutdown() { diff --git a/src/main/java/com/lumaserv/bgp/BGPSession.java b/src/main/java/com/lumaserv/bgp/BGPSession.java index d51a83e..dd2b7ff 100644 --- a/src/main/java/com/lumaserv/bgp/BGPSession.java +++ b/src/main/java/com/lumaserv/bgp/BGPSession.java @@ -50,7 +50,7 @@ public class BGPSession implements Runnable { this.port = -1; } - public BGPSession(BGPServer server, BGPSessionConfiguration configuration, String host, int port) throws IOException { + public BGPSession(BGPServer server, BGPSessionConfiguration configuration, String host, int port) { this.server = server; this.configuration = configuration; this.fsm = new BGPFsm(this); |