diff options
author | Artur Dryomov <artur.dryomov@gmail.com> | 2013-09-21 23:55:46 +0300 |
---|---|---|
committer | Artur Dryomov <artur.dryomov@gmail.com> | 2013-09-22 01:31:22 +0300 |
commit | 7d70990265ec18e01d59898d31d5eabca4a1f2f9 (patch) | |
tree | bb74c7449d3e24b0e5c4a818243a597f8b4ce5bb /android | |
parent | 13cf8f2599a9888f2a6f1b9dd8938978b4a0274f (diff) |
Fix possible unexpected search stop.
An executor stops working when a single task got an exception. This
change prevents only one exception from being uncaught, if this will not
help probably everything should be caught.
Change-Id: I76a57fc0b1c759cb66bf13b5cdec7223c384bfa3
Diffstat (limited to 'android')
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java b/android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java index a35c1d6d97ba..ed0c4c33c0aa 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java +++ b/android/sdremote/src/org/libreoffice/impressremote/communication/TcpServersFinder.java @@ -133,8 +133,7 @@ class TcpServersFinder implements ServersFinder, Runnable { private DatagramPacket buildSearchResultPacket() { byte[] aSearchResultBuffer = new byte[SEARCH_RESULT_BUFFER_SIZE]; - return new DatagramPacket( - aSearchResultBuffer, aSearchResultBuffer.length); + return new DatagramPacket(aSearchResultBuffer, aSearchResultBuffer.length); } private String receiveSearchResult(DatagramPacket aSearchResultPacket) { @@ -145,7 +144,7 @@ class TcpServersFinder implements ServersFinder, Runnable { } catch (SocketTimeoutException e) { return ""; } catch (IOException e) { - throw new RuntimeException("Unable to receive search result."); + return ""; } } |