Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
a631c5ab
Commit
a631c5ab
authored
Mar 10, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0ca57f0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
wcfs/client/wcfs_watchlink.cpp
wcfs/client/wcfs_watchlink.cpp
+4
-3
No files found.
wcfs/client/wcfs_watchlink.cpp
View file @
a631c5ab
...
@@ -88,7 +88,9 @@ error _WatchLink::close() {
...
@@ -88,7 +88,9 @@ error _WatchLink::close() {
// TODO -> better pthread_kill(SIGINT) instead of relying on wcfs proper behaviour?
// TODO -> better pthread_kill(SIGINT) instead of relying on wcfs proper behaviour?
error
err2
=
wlink
.
_serveWG
->
wait
();
error
err2
=
wlink
.
_serveWG
->
wait
();
// XXX getting ErrLinkDown from wait - ok?
// XXX getting ErrLinkDown from wait - ok?
if
(
errors
::
Is
(
err2
,
context
::
canceled
))
// canceled is expected and ok
if
(
errors
::
Is
(
err2
,
context
::
canceled
)
||
// we canceled _serveWG
errors
::
Is
(
err2
,
io
::
EOF_
)
||
// EOF received from WCFS
errors
::
Is
(
err2
,
ErrLinkDown
))
// link shutdown due to logic error; details logged
err2
=
nil
;
err2
=
nil
;
error
err3
=
wlink
.
_f
->
close
();
error
err3
=
wlink
.
_f
->
close
();
...
@@ -153,7 +155,6 @@ error _WatchLink::_serveRX(context::Context ctx) {
...
@@ -153,7 +155,6 @@ error _WatchLink::_serveRX(context::Context ctx) {
if
(
err
!=
nil
)
{
if
(
err
!=
nil
)
{
// peer closed its tx
// peer closed its tx
if
(
err
==
io
::
EOF_
)
{
if
(
err
==
io
::
EOF_
)
{
err
=
nil
;
rxeof
=
true
;
rxeof
=
true
;
wlink
.
rx_eof
.
close
();
wlink
.
rx_eof
.
close
();
}
}
...
@@ -168,7 +169,7 @@ error _WatchLink::_serveRX(context::Context ctx) {
...
@@ -168,7 +169,7 @@ error _WatchLink::_serveRX(context::Context ctx) {
if
(
pkt
.
stream
==
0
)
{
// control/fatal message from wcfs
if
(
pkt
.
stream
==
0
)
{
// control/fatal message from wcfs
log
::
Errorf
(
"C: watch : rx fatal: %s
\n
"
,
v
(
l
));
log
::
Errorf
(
"C: watch : rx fatal: %s
\n
"
,
v
(
l
));
wlink
.
fatalv
.
push_back
(
pkt
.
to_string
());
wlink
.
fatalv
.
push_back
(
pkt
.
to_string
());
return
E
rrLinkDown
;
// XXX correct error
return
E
(
ErrLinkDown
)
;
// XXX correct error
}
}
bool
reply
=
(
pkt
.
stream
%
2
!=
0
);
bool
reply
=
(
pkt
.
stream
%
2
!=
0
);
...
...
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