Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
O
openclaw-android-node
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lisa
openclaw-android-node
Commits
65fd2fb5
Commit
65fd2fb5
authored
Mar 11, 2026
by
Lisa (AI Assistant)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Add stored config variables for retry logic
parent
9b310d25
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
NodeService.kt
...main/java/com/nexlab/openclaw/node/service/NodeService.kt
+17
-3
No files found.
app/src/main/java/com/nexlab/openclaw/node/service/NodeService.kt
View file @
65fd2fb5
...
...
@@ -40,6 +40,13 @@ class NodeService : Service() {
private
val
screenshotService
by
lazy
{
ScreenshotService
(
this
)
}
// Store config for retry logic
private
var
storedIp
=
""
private
var
storedPort
=
"18789"
private
var
storedToken
=
""
private
var
storedProtocol
=
"WS"
private
var
storedNodeId
=
""
override
fun
onBind
(
intent
:
Intent
?):
IBinder
?
=
null
override
fun
onCreate
()
{
...
...
@@ -81,6 +88,13 @@ class NodeService : Service() {
}
// END TEMPORARY CONFIG
// Store for retry logic
storedIp
=
ip
storedPort
=
port
storedToken
=
token
storedProtocol
=
protocol
storedNodeId
=
nodeId
Log
.
e
(
TAG
,
"Settings read: ip=$ip tokenLen=${token.length} port=$port"
)
if
(
ip
.
isNotBlank
()
&&
token
.
isNotBlank
())
{
...
...
@@ -204,10 +218,10 @@ class NodeService : Service() {
Log
.
e
(
TAG
,
"Connection failed, scheduling retry in 3 seconds..."
)
scope
.
launch
{
delay
(
3000
)
if
(
ip
.
isNotBlank
()
&&
t
oken
.
isNotBlank
())
{
val
fullUrl
=
if
(
protocol
==
"WSS"
)
"wss://$ip:$port"
else
"ws://$ip:$port
"
if
(
storedIp
.
isNotBlank
()
&&
storedT
oken
.
isNotBlank
())
{
val
fullUrl
=
if
(
storedProtocol
==
"WSS"
)
"wss://${storedIp}:${storedPort}"
else
"ws://${storedIp}:${storedPort}
"
Log
.
e
(
TAG
,
"Retrying connection to: $fullUrl"
)
startNode
(
fullUrl
,
token
,
n
odeId
)
startNode
(
fullUrl
,
storedToken
,
storedN
odeId
)
}
}
}
...
...
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