Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyuan
byit-myth-job
Commits
58410825
Commit
58410825
authored
Dec 09, 2020
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复RPCserver调用失败后无法写回的BUG
parent
c143dfab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
NettyPluginServerHandler.java
...m/byit/server/netty/handler/NettyPluginServerHandler.java
+5
-2
No files found.
byit-plugin-core/myth-plugin-rpc-server/src/main/java/com/byit/server/netty/handler/NettyPluginServerHandler.java
View file @
58410825
...
@@ -88,6 +88,8 @@ public class NettyPluginServerHandler extends SimpleChannelInboundHandler<Plugin
...
@@ -88,6 +88,8 @@ public class NettyPluginServerHandler extends SimpleChannelInboundHandler<Plugin
rpcResponsePacket
.
setStatus
(
true
);
rpcResponsePacket
.
setStatus
(
true
);
rpcResponsePacket
.
setRunTime
(
endTime
-
startTime
);
rpcResponsePacket
.
setRunTime
(
endTime
-
startTime
);
rpcResponsePacket
.
setExtension
(
msg
.
getExtension
());
rpcResponsePacket
.
setExtension
(
msg
.
getExtension
());
rpcResponsePacket
.
setType
(
ResponseTyEnum
.
RESPONSE
.
getType
());
ctx
.
channel
().
writeAndFlush
(
rpcResponsePacket
);
}
catch
(
Throwable
e
){
}
catch
(
Throwable
e
){
rpcResponsePacket
.
setCode
(
JobResultEnum
.
FAIL
.
getCode
());
rpcResponsePacket
.
setCode
(
JobResultEnum
.
FAIL
.
getCode
());
rpcResponsePacket
.
setMsg
(
PluginLogUtils
.
getMessage
(
e
));
rpcResponsePacket
.
setMsg
(
PluginLogUtils
.
getMessage
(
e
));
...
@@ -97,10 +99,11 @@ public class NettyPluginServerHandler extends SimpleChannelInboundHandler<Plugin
...
@@ -97,10 +99,11 @@ public class NettyPluginServerHandler extends SimpleChannelInboundHandler<Plugin
execute
.
setMsg
(
PluginLogUtils
.
getMessage
(
e
));
execute
.
setMsg
(
PluginLogUtils
.
getMessage
(
e
));
execute
.
setCode
(
JobResultEnum
.
FAIL
.
getCode
());
execute
.
setCode
(
JobResultEnum
.
FAIL
.
getCode
());
rpcResponsePacket
.
setResult
(
execute
);
rpcResponsePacket
.
setResult
(
execute
);
rpcResponsePacket
.
setType
(
ResponseTyEnum
.
RESPONSE
.
getType
());
ctx
.
channel
().
writeAndFlush
(
rpcResponsePacket
);
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
rpcResponsePacket
.
setType
(
ResponseTyEnum
.
RESPONSE
.
getType
());
ctx
.
channel
().
writeAndFlush
(
rpcResponsePacket
);
}
}
}
}
...
...
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