diff options
author | Arne Schwabe <arne@rfc2549.org> | 2013-02-05 16:42:37 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2013-02-05 16:42:37 +0100 |
commit | 680f5a18227f0a7e9037b42c97a57b19403cfaa4 (patch) | |
tree | 004911c7ed3298b79525795b549b8018821659ad /src/de/blinkt | |
parent | 1a65622af5d97bfcf56c84e90e40bfd0b214e43b (diff) |
Use arrows instead of text in the transferred byte message to save space. Fix closing of management socket
Diffstat (limited to 'src/de/blinkt')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnService.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnService.java b/src/de/blinkt/openvpn/OpenVpnService.java index 71cc5cd2..6103ff89 100644 --- a/src/de/blinkt/openvpn/OpenVpnService.java +++ b/src/de/blinkt/openvpn/OpenVpnService.java @@ -201,6 +201,8 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac private LocalServerSocket openManagmentInterface(int tries) { // Could take a while to open connection String socketname = (getCacheDir().getAbsolutePath() + "/" + "mgmtsocket"); + // The sock is transfered to the LocalServerSocket, ignore warning + @SuppressWarnings("resource") LocalSocket sock = new LocalSocket(); while(tries > 0 && !sock.isConnected()) { @@ -221,12 +223,6 @@ public class OpenVpnService extends VpnService implements StateListener, Callbac return lss; } catch (IOException e) { e.printStackTrace(); - } finally { - try { - sock.close(); - } catch (IOException e) { - e.printStackTrace(); - } } return null; |