Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
3ffe0c09
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "9e7bae9881725cc71c124286109446eef264cbd7"
Unverified
Commit
3ffe0c09
authored
Jun 20, 2022
by
Rhett Ying
Committed by
GitHub
Jun 20, 2022
Browse files
[Dist] re-try to receive rpc ndarray msg (#4142)
parent
4a9be030
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
src/rpc/network/socket_communicator.cc
src/rpc/network/socket_communicator.cc
+11
-8
No files found.
src/rpc/network/socket_communicator.cc
View file @
3ffe0c09
...
...
@@ -291,14 +291,17 @@ rpc::RPCStatus SocketReceiver::Recv(rpc::RPCMessage* msg, int timeout) {
std
::
vector
<
void
*>
buffer_list
(
nonempty_ndarray_count
);
for
(
int
i
=
0
;
i
<
nonempty_ndarray_count
;
++
i
)
{
Message
ndarray_data_msg
;
status
=
RecvFrom
(
&
ndarray_data_msg
,
send_id
,
timeout
);
if
(
status
==
QUEUE_EMPTY
)
{
// As we cannot handle this timeout for now, let's treat it as fatal
// error.
LOG
(
FATAL
)
<<
"Timed out when trying to receive rpc ndarray data after "
<<
timeout
<<
" milliseconds."
;
return
rpc
::
kRPCTimeOut
;
}
// As meta message has been received, data message is always expected unless
// connection is closed.
STATUS
status
;
do
{
status
=
RecvFrom
(
&
ndarray_data_msg
,
send_id
,
timeout
);
if
(
status
==
QUEUE_EMPTY
)
{
DLOG
(
WARNING
)
<<
"Timed out when trying to receive rpc ndarray data after "
<<
timeout
<<
" milliseconds."
;
}
}
while
(
status
==
QUEUE_EMPTY
);
CHECK_EQ
(
status
,
REMOVE_SUCCESS
);
buffer_list
[
i
]
=
ndarray_data_msg
.
data
;
}
...
...
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