Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wade
DnsChanger
Commits
69544c2a
Commit
69544c2a
authored
Apr 13, 2018
by
Daniel Wolf
Browse files
Don't continue with the iteration if the proxy should stop
parent
bfd36f59
Changes
1
Show whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/dnschanger/util/dnsproxy/DNSUDPProxy.java
View file @
69544c2a
...
...
@@ -127,7 +127,7 @@ public class DNSUDPProxy extends DNSProxy{
FileInputStream
inputStream
=
new
FileInputStream
(
parcelFileDescriptor
.
getFileDescriptor
());
FileOutputStream
outputStream
=
new
FileOutputStream
(
parcelFileDescriptor
.
getFileDescriptor
());
byte
[]
packet
=
new
byte
[
32767
];
while
(
shouldRun
){
outer:
while
(
shouldRun
){
StructPollfd
structFd
=
new
StructPollfd
();
structFd
.
fd
=
inputStream
.
getFD
();
structFd
.
events
=
(
short
)
OsConstants
.
POLLIN
;
...
...
@@ -143,6 +143,7 @@ public class DNSUDPProxy extends DNSProxy{
int
index
=
0
;
if
(
shouldRun
){
for
(
DatagramSocket
socket:
futureSocketAnswers
.
keySet
()){
if
(!
shouldRun
)
break
outer
;
StructPollfd
pollingFd
=
polls
[
2
+
index
++]
=
new
StructPollfd
();
pollingFd
.
fd
=
ParcelFileDescriptor
.
fromDatagramSocket
(
socket
).
getFileDescriptor
();
pollingFd
.
events
=
(
short
)
OsConstants
.
POLLIN
;
...
...
Write
Preview
Supports
Markdown
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