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
c1a717b3
Commit
c1a717b3
authored
May 17, 2022
by
罗长华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RpcException不做处理
parent
7312f517
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
core/src/main/java/com/wecloud/im/ws/sender/ChannelSender.java
+7
-1
No files found.
core/src/main/java/com/wecloud/im/ws/sender/ChannelSender.java
View file @
c1a717b3
...
@@ -13,6 +13,7 @@ import java.util.stream.Collectors;
...
@@ -13,6 +13,7 @@ import java.util.stream.Collectors;
import
org.apache.dubbo.config.annotation.DubboReference
;
import
org.apache.dubbo.config.annotation.DubboReference
;
import
org.apache.dubbo.rpc.RpcContext
;
import
org.apache.dubbo.rpc.RpcContext
;
import
org.apache.dubbo.rpc.RpcException
;
import
org.apache.dubbo.rpc.cluster.router.address.Address
;
import
org.apache.dubbo.rpc.cluster.router.address.Address
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -159,7 +160,12 @@ public class ChannelSender {
...
@@ -159,7 +160,12 @@ public class ChannelSender {
Address
address
=
new
Address
(
clientChannelInfo
.
getLanIp
(),
20882
);
Address
address
=
new
Address
(
clientChannelInfo
.
getLanIp
(),
20882
);
RpcContext
.
getContext
().
setObjectAttachment
(
"address"
,
address
);
RpcContext
.
getContext
().
setObjectAttachment
(
"address"
,
address
);
log
.
info
(
"dubbo指定ip调用 {}"
,
JSON
.
toJSONString
(
address
));
log
.
info
(
"dubbo指定ip调用 {}"
,
JSON
.
toJSONString
(
address
));
routerSendService
.
sendMsgRemote
(
toClientId
,
clientChannelInfo
.
getPlatform
(),
msgJson
);
try
{
routerSendService
.
sendMsgRemote
(
toClientId
,
clientChannelInfo
.
getPlatform
(),
msgJson
);
}
catch
(
RpcException
exception
)
{
// do nothing is ok
log
.
info
(
"rpc 调用异常 {} "
,
JSON
.
toJSONString
(
clientChannelInfo
));
}
}
}
}
}
...
...
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