Commit 611dd428 authored by Matti Pulkkinen's avatar Matti Pulkkinen
Browse files

throw IOException out of openObjectStreams()

parent fadf2a1a
......@@ -77,8 +77,9 @@ public class SocketHandler {
*
* @param ois
* @param oos
* @throws IOException if opening one of the sockets fails.
*/
public void openObjectStreams(ObjectInputStream ois, ObjectOutputStream oos) {
public void openObjectStreams(ObjectInputStream ois, ObjectOutputStream oos) throws IOException {
int timesRetried = 0;
do {
this.sendPortNumber(REMOTEHOST, REMOTEPORT, LOCALPORT);
......@@ -97,10 +98,6 @@ public class SocketHandler {
} catch (SocketTimeoutException ex) {
System.err.println("Socket timed out, trying again...");
timesRetried++;
} catch (IOException e) {
System.err.println("Failed in opening object streams.");
e.printStackTrace();
break;
}
} while (timesRetried < MAXRETRIES);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment