Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Administrator
AloqaIM-Android
Commits
3ad85083
Commit
3ad85083
authored
Nov 10, 2016
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 2 or more websockets illegally connected
parent
66a68396
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
RocketChatService.java
...n/java/chat/rocket/android/service/RocketChatService.java
+4
-1
No files found.
app/src/main/java/chat/rocket/android/service/RocketChatService.java
View file @
3ad85083
...
@@ -86,7 +86,9 @@ public class RocketChatService extends Service {
...
@@ -86,7 +86,9 @@ public class RocketChatService extends Service {
for
(
ServerConfig
config
:
configList
)
{
for
(
ServerConfig
config
:
configList
)
{
findOrCreateWebSocketThread
(
config
).
onSuccess
(
task
->
{
findOrCreateWebSocketThread
(
config
).
onSuccess
(
task
->
{
RocketChatWebSocketThread
thread
=
task
.
getResult
();
RocketChatWebSocketThread
thread
=
task
.
getResult
();
thread
.
syncStateWith
(
config
);
if
(
thread
!=
null
)
{
thread
.
syncStateWith
(
config
);
}
return
null
;
return
null
;
});
});
}
}
...
@@ -97,6 +99,7 @@ public class RocketChatService extends Service {
...
@@ -97,6 +99,7 @@ public class RocketChatService extends Service {
if
(
webSocketThreads
.
containsKey
(
serverConfigId
))
{
if
(
webSocketThreads
.
containsKey
(
serverConfigId
))
{
return
Task
.
forResult
(
webSocketThreads
.
get
(
serverConfigId
));
return
Task
.
forResult
(
webSocketThreads
.
get
(
serverConfigId
));
}
else
{
}
else
{
webSocketThreads
.
put
(
serverConfigId
,
null
);
return
RocketChatWebSocketThread
.
getStarted
(
getApplicationContext
(),
config
)
return
RocketChatWebSocketThread
.
getStarted
(
getApplicationContext
(),
config
)
.
onSuccessTask
(
task
->
{
.
onSuccessTask
(
task
->
{
webSocketThreads
.
put
(
serverConfigId
,
task
.
getResult
());
webSocketThreads
.
put
(
serverConfigId
,
task
.
getResult
());
...
...
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