Commit 17ae4653 authored by Max Lv's avatar Max Lv

catch exceptions

parent ce3575fa
......@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.github.shadowsocks"
android:installLocation="auto"
android:versionCode="2"
android:versionName="1.0.1">
android:versionCode="3"
android:versionName="1.0.2">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
......
......@@ -162,10 +162,10 @@
net = require("net");
console.log("calculating ciphers");
console.log = function() {};
console.log("calculating ciphers");
tables = getTable(KEY);
encryptTable = tables[0];
......@@ -189,8 +189,13 @@
if (stage === 5) {
encrypt(encryptTable, data);
// Android Patch
if (data == null || !remote.write(data)) {
try {
if (remote == null || !remote.write(data)) {
connection.pause();
}
} catch (e) {
connection.pause();
console.warn("unexpected exception: " + e);
}
return;
}
......
......@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.shadowsocks</groupId>
<artifactId>shadowsocks</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<packaging>apk</packaging>
<name>Shadowsocks</name>
......
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