diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-01-26 21:52:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-01-26 21:52:48 +0100 |
| commit | d84b1e421e2f4b1596da67e980a59b1b00105a96 (patch) | |
| tree | 6ce80513285b19bc45ef2a54d56a6c8c20cea4e9 | |
| parent | 67caa9c4c984641c246db51a232b870a8a5c2284 (diff) | |
stop hang if tx fails
| -rw-r--r-- | src/wx/cucumber_bridge.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wx/cucumber_bridge.cc b/src/wx/cucumber_bridge.cc index 3b9f896c9..d392b5554 100644 --- a/src/wx/cucumber_bridge.cc +++ b/src/wx/cucumber_bridge.cc @@ -105,6 +105,8 @@ CucumberBridge::idle() AddContentFile(*message.parameter); } else if (message.id == CUCUMBER_BRIDGE_GET_CONTENT_LIST) { /* I hope it's OK to send and receive from nanomsg sockets from different threads */ - _nanomsg.send(GetContentList()->c_str(), -1); + if (!_nanomsg.send(GetContentList()->c_str(), 200)) { + std::cerr << "Failed to send content list reply.\n"; + } } } |
