File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
include/llvm/ExecutionEngine/Orc Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -813,20 +813,20 @@ class RPCEndpointBase {
813
813
// Open the function call message.
814
814
if (auto Err = C.startSendMessage (FnId, SeqNo)) {
815
815
abandonPendingResponses ();
816
- return joinErrors ( std::move ( Err), C. endSendMessage ()) ;
816
+ return Err;
817
817
}
818
818
819
819
// Serialize the call arguments.
820
820
if (auto Err = detail::HandlerTraits<typename Func::Type>::serializeArgs (
821
821
C, Args...)) {
822
822
abandonPendingResponses ();
823
- return joinErrors ( std::move ( Err), C. endSendMessage ()) ;
823
+ return Err;
824
824
}
825
825
826
826
// Close the function call messagee.
827
827
if (auto Err = C.endSendMessage ()) {
828
828
abandonPendingResponses ();
829
- return std::move ( Err) ;
829
+ return Err;
830
830
}
831
831
832
832
return Error::success ();
Original file line number Diff line number Diff line change @@ -48,7 +48,11 @@ class RawByteChannel {
48
48
template <typename FunctionIdT, typename SequenceIdT>
49
49
Error startSendMessage (const FunctionIdT &FnId, const SequenceIdT &SeqNo) {
50
50
writeLock.lock ();
51
- return serializeSeq (*this , FnId, SeqNo);
51
+ if (auto Err = serializeSeq (*this , FnId, SeqNo)) {
52
+ writeLock.unlock ();
53
+ return Err;
54
+ }
55
+ return Error::success ();
52
56
}
53
57
54
58
// / Notify the channel that we're ending a message send.
@@ -63,7 +67,11 @@ class RawByteChannel {
63
67
template <typename FunctionIdT, typename SequenceNumberT>
64
68
Error startReceiveMessage (FunctionIdT &FnId, SequenceNumberT &SeqNo) {
65
69
readLock.lock ();
66
- return deserializeSeq (*this , FnId, SeqNo);
70
+ if (auto Err = deserializeSeq (*this , FnId, SeqNo)) {
71
+ readLock.unlock ();
72
+ return Err;
73
+ }
74
+ return Error::success ();
67
75
}
68
76
69
77
// / Notify the channel that we're ending a message receive.
You can’t perform that action at this time.
0 commit comments