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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
60b90468
Commit
60b90468
authored
Mar 09, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
2461344f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
wcfs/client/wcfs_watchlink.cpp
wcfs/client/wcfs_watchlink.cpp
+4
-6
wcfs/client/wcfs_watchlink.h
wcfs/client/wcfs_watchlink.h
+1
-1
No files found.
wcfs/client/wcfs_watchlink.cpp
View file @
60b90468
...
@@ -87,12 +87,10 @@ error _WatchLink::close() {
...
@@ -87,12 +87,10 @@ error _WatchLink::close() {
error
err
=
wlink
.
closeWrite
();
error
err
=
wlink
.
closeWrite
();
wlink
.
_serveCancel
();
wlink
.
_serveCancel
();
// XXX we can get stuck here if wcfs does not behave as we want.
// NOTE we can get stuck here if wcfs does not behave correctly by closing
// XXX in particular if there is a silly - e.g. syntax or type error in
// its side in reply to our "bye" message.
// test code - we currently get stuck here.
//
//
// XXX -> better pthread_kill(SIGINT) instead of relying on wcfs proper behaviour?
// TODO -> better pthread_kill(SIGINT) instead of relying on wcfs proper behaviour?
// XXX -> we now have `kill -QUIT` to wcfs.go on test timeout - remove ^^^ comments?
error
err2
=
wlink
.
_serveWG
->
wait
();
error
err2
=
wlink
.
_serveWG
->
wait
();
// canceled is expected and ok
// canceled is expected and ok
if
(
errors
::
Is
(
err2
,
context
::
canceled
))
if
(
errors
::
Is
(
err2
,
context
::
canceled
))
...
@@ -108,7 +106,7 @@ error _WatchLink::close() {
...
@@ -108,7 +106,7 @@ error _WatchLink::close() {
}
}
// _serveRX receives messages from ._f and dispatches them according to streamID.
// _serveRX receives messages from ._f and dispatches them according to streamID.
error
_WatchLink
::
_serveRX
(
context
::
Context
ctx
)
{
// XXX error -> where ?
error
_WatchLink
::
_serveRX
(
context
::
Context
ctx
)
{
_WatchLink
&
wlink
=
*
this
;
_WatchLink
&
wlink
=
*
this
;
xerr
::
Contextf
E
(
"%s: serve rx"
,
v
(
wlink
));
xerr
::
Contextf
E
(
"%s: serve rx"
,
v
(
wlink
));
...
...
wcfs/client/wcfs_watchlink.h
View file @
60b90468
...
@@ -92,7 +92,7 @@ class _WatchLink : public object {
...
@@ -92,7 +92,7 @@ class _WatchLink : public object {
// XXX for tests
// XXX for tests
public:
public:
vector
<
string
>
fatalv
;
// ad-hoc, racy. TODO rework to send mess
e
ges to control channel
vector
<
string
>
fatalv
;
// ad-hoc, racy. TODO rework to send mess
a
ges to control channel
chan
<
structZ
>
rx_eof
;
// becomes ready when wcfs closes its tx side
chan
<
structZ
>
rx_eof
;
// becomes ready when wcfs closes its tx side
// don't new - create only via WCFS._openwatch()
// don't new - create only via WCFS._openwatch()
...
...
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