Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
cc3810f5
Commit
cc3810f5
authored
May 19, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调试日志打印
parent
c8dea918
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
core/src/main/java/com/wecloud/im/ws/manager/ChannelManager.java
+4
-0
No files found.
core/src/main/java/com/wecloud/im/ws/manager/ChannelManager.java
View file @
cc3810f5
package
com
.
wecloud
.
im
.
ws
.
manager
;
package
com
.
wecloud
.
im
.
ws
.
manager
;
import
com.alibaba.fastjson.JSON
;
import
io.netty.channel.ChannelHandlerContext
;
import
io.netty.channel.ChannelHandlerContext
;
import
io.netty.channel.socket.nio.NioSocketChannel
;
import
io.netty.channel.socket.nio.NioSocketChannel
;
import
io.netty.util.AttributeKey
;
import
io.netty.util.AttributeKey
;
...
@@ -97,11 +98,14 @@ public class ChannelManager {
...
@@ -97,11 +98,14 @@ public class ChannelManager {
clientInfo
.
setDeviceId
(
""
);
clientInfo
.
setDeviceId
(
""
);
clientInfo
.
setNioSocketChannel
(
channel
);
clientInfo
.
setNioSocketChannel
(
channel
);
clientInfo
.
setToken
(
""
);
clientInfo
.
setToken
(
""
);
log
.
info
(
"本地存缓存key {}"
,
genKeyForSessionInfoMap
(
clientId
,
platform
));
ChannelManager
.
SESSION_INFO_MAP
.
put
(
genKeyForSessionInfoMap
(
clientId
,
platform
),
clientInfo
);
ChannelManager
.
SESSION_INFO_MAP
.
put
(
genKeyForSessionInfoMap
(
clientId
,
platform
),
clientInfo
);
}
}
private
void
delSessionInfoMap
(
Long
clientId
,
Integer
platform
)
{
private
void
delSessionInfoMap
(
Long
clientId
,
Integer
platform
)
{
log
.
info
(
"本地清缓存key {}"
,
genKeyForSessionInfoMap
(
clientId
,
platform
));
ChannelManager
.
SESSION_INFO_MAP
.
remove
(
genKeyForSessionInfoMap
(
clientId
,
platform
));
ChannelManager
.
SESSION_INFO_MAP
.
remove
(
genKeyForSessionInfoMap
(
clientId
,
platform
));
log
.
info
(
"删除map后,本地缓存结果 {}"
,
JSON
.
toJSONString
(
ChannelManager
.
SESSION_INFO_MAP
.
get
(
genKeyForSessionInfoMap
(
clientId
,
platform
))));
}
}
}
}
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