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
AndroidUtils
VPNTunnelProxy
Commits
f8a79e87
Commit
f8a79e87
authored
Sep 14, 2020
by
Daniel Wolf
Browse files
Set the byte array to null after reading
parent
fdd56fa8
Pipeline
#7476
failed with stages
in 2 minutes and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
library/src/main/java/com/frostnerd/vpntunnelproxy/TunnelHandle.kt
View file @
f8a79e87
...
...
@@ -94,8 +94,9 @@ class TunnelHandle(proxy: Proxy,
fun
hasDataForDevice
():
Boolean
=
byteReadCounter
!=
byteWriteCounter
internal
fun
pollBytesToDevice
():
ByteArray
?
{
return
(
byteReadCounter
++
%
maxConcurrentAnswerSize
).
let
{
byteOutput
[
it
]
val
index
=
byteReadCounter
++
%
maxConcurrentAnswerSize
return
byteOutput
[
index
].
also
{
byteOutput
[
index
]
=
null
}
}
...
...
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