Commit d15f8444 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 9fe0087c
...@@ -71,12 +71,11 @@ pair<WatchLink, error> WCFS::_openwatch() { ...@@ -71,12 +71,11 @@ pair<WatchLink, error> WCFS::_openwatch() {
error _WatchLink::closeWrite() { error _WatchLink::closeWrite() {
_WatchLink &wlink = *this; _WatchLink &wlink = *this;
error err;
wlink._txclose1.do_([&]() { wlink._txclose1.do_([&]() {
// ask wcfs to close its tx & rx sides; close(wcfs.tx) wakes up // ask wcfs to close its tx & rx sides; close(wcfs.tx) wakes up
// _serveRX on client (= on us). The connection can be already closed // _serveRX on client (= on us). The connection can be already closed
// by wcfs - so ignore errors when sending bye. // by wcfs - so ignore errors when sending bye.
err = wlink._send(1, "bye"); // XXX stream ok? (void)wlink._send(1, "bye"); // XXX stream ok?
// XXX vvv should be ~ shutdown(TX, wlink._f), however shutdown does // XXX vvv should be ~ shutdown(TX, wlink._f), however shutdown does
// not work for non-socket file descriptors. And even if we dup link // not work for non-socket file descriptors. And even if we dup link
// fd, and close only one used for TX, peer's RX will still be blocked // fd, and close only one used for TX, peer's RX will still be blocked
...@@ -84,7 +83,7 @@ error _WatchLink::closeWrite() { ...@@ -84,7 +83,7 @@ error _WatchLink::closeWrite() {
// state. So just use ^^^ "bye" as "TX closed" message. // state. So just use ^^^ "bye" as "TX closed" message.
// wlink._wtx.close(); // wlink._wtx.close();
}); });
return err; return nil;
} }
// close closes the link. // close closes the link.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment