If we can't parse the port file, try again. Maybe we are catching it between create and write?
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4494 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
0e5d6056e4
commit
39dbfdec82
@ -111,8 +111,8 @@ public class MainActivity extends Activity {
|
|||||||
activity.runOnUiThread(() -> {
|
activity.runOnUiThread(() -> {
|
||||||
web_view.loadUrl(base_url);
|
web_view.loadUrl(base_url);
|
||||||
});
|
});
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!key.reset()) {
|
if (!key.reset()) {
|
||||||
@ -242,6 +242,8 @@ public class MainActivity extends Activity {
|
|||||||
private int read_port(String path) {
|
private int read_port(String path) {
|
||||||
try (BufferedReader reader = new BufferedReader(new FileReader(path))) {
|
try (BufferedReader reader = new BufferedReader(new FileReader(path))) {
|
||||||
return Integer.parseInt(reader.readLine());
|
return Integer.parseInt(reader.readLine());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
e.printStackTrace();
|
||||||
} catch (java.io.FileNotFoundException e) {
|
} catch (java.io.FileNotFoundException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (java.io.IOException e) {
|
} catch (java.io.IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user