Skip to content

Commit

Permalink
Merge branch 'gz-launch6' into merge_6_7_20240802
Browse files Browse the repository at this point in the history
  • Loading branch information
iche033 committed Aug 2, 2024
2 parents 2cb58a1 + b4f88c0 commit f0d33a7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions plugins/joy_to_twist/JoyToTwist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#endif

#include <string>
#include <vector>

#include <gz/msgs/joy.pb.h>
#include <gz/msgs/twist.pb.h>
Expand Down
11 changes: 8 additions & 3 deletions plugins/websocket_server/WebsocketServer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,14 @@ void WebsocketServer::Run()

while (this->run)
{
// The second parameter is a timeout that is no longer used by
// libwebsockets.
lws_service(this->context, 0);
// The second parameter is used to control lws's event wait time.
// A -1 does not wait for an event, and 0 causes lws to wait
// for an event. When shutting down the websocket server, the
// wait time could be over 30 seconds if 0 is used.
//
// We are running lws in a separate thread with out our own
// condition variable. So, we will not use lws's event wait.
lws_service(this->context, -1);

// Wait for (1/60) seconds or an event.
std::unique_lock<std::mutex> lock(this->runMutex);
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/cmdlaunch.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

require 'pathname'
# Constants.
LIBRARY_VERSION = '@PROJECT_VERSION_FULL@'
COMMANDS = {
Expand All @@ -28,9 +29,8 @@ class Cmd
command = args[0]
exe_name = COMMANDS[command]

if exe_name[0] == '/'
# If the first character is a slash, we'll assume that we've been given an
# absolute path to the executable. This is only used during test mode.
if Pathname.new(exe_name).absolute?
# The exe_name can be absolute path during test. We'll leave it unchanged
else
# We're assuming that the library path is relative to the current
# location of this script.
Expand Down

0 comments on commit f0d33a7

Please sign in to comment.