Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
f870093c
Commit
f870093c
authored
Dec 05, 2017
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix EBADF error with proguard
parent
f4e5a958
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
6 deletions
+18
-6
mobile/proguard-rules.pro
mobile/proguard-rules.pro
+2
-0
mobile/src/main/java/com/github/shadowsocks/bg/LocalSocketListener.kt
...ain/java/com/github/shadowsocks/bg/LocalSocketListener.kt
+16
-6
No files found.
mobile/proguard-rules.pro
View file @
f870093c
...
...
@@ -23,6 +23,8 @@
-
keepattributes
*
DatabaseField
*
-
keepattributes
*
DatabaseTable
*
-
keepattributes
*
SerializedName
*
-
keepattributes
Exceptions
,
InnerClasses
-
keep
class
com
.
j256
.
**
-
keepclassmembers
class
com
.
j256
.
**
{
*
;
}
-
keep
enum
com
.
j256
.
**
...
...
mobile/src/main/java/com/github/shadowsocks/bg/LocalSocketListener.kt
View file @
f870093c
...
...
@@ -54,16 +54,26 @@ abstract class LocalSocketListener(private val tag: String) : Thread() {
while
(
true
)
{
val
serverSocket
=
serverSocket
.
get
()
?:
return
try
{
val
socket
=
serverSocket
.
accept
()
try
{
serverSocket
.
accept
()
accept
(
socket
)
}
catch
(
e
:
Exception
)
{
Log
.
e
(
tag
,
"Error when recv traffic stat"
,
e
)
app
.
track
(
e
)
}
try
{
socket
.
close
()
}
catch
(
e
:
IOException
)
{
Log
.
e
(
tag
,
"Error when
accept
socket"
,
e
)
Log
.
e
(
tag
,
"Error when
closing the local
socket"
,
e
)
app
.
track
(
e
)
null
}
?.
use
(
this
::
accept
)
}
catch
(
e
:
Exception
)
{
Log
.
e
(
tag
,
"Error when
recv traffic sta
t"
,
e
)
}
}
catch
(
e
:
IO
Exception
)
{
Log
.
e
(
tag
,
"Error when
accept socke
t"
,
e
)
app
.
track
(
e
)
return
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment