mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-20 21:42:05 +08:00
repaly: stop publish socket on multiple publishers error (#22449)
This commit is contained in:
@@ -264,7 +264,10 @@ void Replay::stream() {
|
||||
// publish msg
|
||||
if (sm == nullptr) {
|
||||
auto bytes = evt->bytes();
|
||||
pm->send(sockets_[cur_which], (capnp::byte *)bytes.begin(), bytes.size());
|
||||
if (-1 == pm->send(sockets_[cur_which], (capnp::byte *)bytes.begin(), bytes.size())) {
|
||||
qDebug() << "stop publish" << sockets_[cur_which] << "due to multiple publishers error";
|
||||
sockets_[cur_which] = nullptr;
|
||||
}
|
||||
} else {
|
||||
sm->update_msgs(nanos_since_boot(), {{sockets_[cur_which], evt->event}});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user