Commit fe485267 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3b7a4381
......@@ -136,12 +136,12 @@ error _WatchLink::_serveRX(context::Context ctx) {
wlink._rxmu.lock();
wlink._rxeof = rxeof;
wlink._down = true; // don't allow new rxtab registers; mark the link as down
wlink._rxmu.unlock();
wlink._acceptq.close();
for (auto _ : wlink._rxtab) { // FIXME iterates without lock
for (auto _ : wlink._rxtab) {
auto rxq = _.second;
rxq.close();
}
wlink._rxmu.unlock();
wlink._acceptq.close();
});
string l;
......@@ -166,8 +166,8 @@ error _WatchLink::_serveRX(context::Context ctx) {
return E(err);
if (pkt.stream == 0) { // control/fatal message from wcfs
log::Errorf("C: watch : rx fatal: %s\n", v(l));
wlink.fatalv.push_back(pkt.to_string()); // XXX stub -> errorq?
log::Errorf("%s: rx fatal: %s\n", v(wlink), v(l));
wlink.fatalv.push_back(pkt.to_string()); // XXX stub -> errorq
continue; // wcfs should close link after error
}
......
......@@ -77,7 +77,7 @@ class _WatchLink : public object {
// iso.protocol message IO
chan<rxPkt> _acceptq; // server originated messages go here
sync::Mutex _rxmu; // XXX -> _mu ?
sync::Mutex _rxmu;
bool _down; // y when the link is no-longer operational
bool _rxeof; // y if EOF was received from server
dict<StreamID, chan<rxPkt>>
......
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