Bug 751 : net library dies unceremoniously on "Connection Refused"
Last modified: 2008-05-04 16:19




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P3
Severity:
normal

 

Reporter:
JohnG
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2008-03-27 04:13
Trying to connect to a host/port that's unavailable causes a sketch to quit
because ConnectException is thrown, not IOException

Change needed to net/Client.java:
change
} catch (IOException e) {
System.out.println("IOException");
e.printStackTrace();
dispose();
}

to be:
} catch (ConnectException e) {
e.printStackTrace();
dispose();
} catch (IOException e) {
e.printStackTrace();
dispose();
}

Or possibly just
} catch (Exception e) {
e.printStackTrace();
dispose();
}
Additional Comment #1 From fry 2008-04-04 19:36
k, that should be an easy fix, thanks.
Additional Comment #2 From fry 2008-05-04 16:19
fixed for 0136, thanks again.