Skip to content

Commit

Permalink
Fixed boost::thread_resource_error: Resource temporarily unavailable …
Browse files Browse the repository at this point in the history
…exception that was thrown using netcat to feed socket_node.cpp with NMEA sentences. (#5)
  • Loading branch information
aviogit authored and mikepurvis committed Dec 19, 2016
1 parent f2ec284 commit 38beda7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,5 +235,6 @@ void rx_stop_all()

void rx_thread_start(ros::NodeHandle& n, int fd, std::string frame_id, uint32_t byte_time_ns)
{
rx_prune_threads();
rx_threads.push_back(new boost::thread(_thread_func, boost::ref(n), fd, frame_id, byte_time_ns));
}
2 changes: 2 additions & 0 deletions src/socket_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ int main(int argc, char **argv)
}
}

rx_stop_all();

close(listener_fd);
return 0;
}

0 comments on commit 38beda7

Please sign in to comment.