oxen-mq/lokimq
Jason Rhinelander 253f1ee66e Move socket holding into LokiMQ instance
The thread_local `std::map` here can end up being destructed *before*
the LokiMQ instance (if both are being destroyed during thread joining),
in which case we segfault by trying to use the map.  Move the owning
container into the LokiMQ instead (indexed by the thread) to prevent
that.

Also cleans this code up by:

- Don't close control sockets from the proxy thread; socket_t's aren't
necessarily thread safe so this could be causing issues where we trouble
double-closing or using a closed socket.

- We can just let them get closed during destruction of the LokiMQ.

- Avoid needing shared_ptr's; instead we can just use a unique pointer
with raw pointers in the thread_local cache.  This simplifies closing
because all closing will happen during the LokiMQ destruction.
2020-11-17 11:54:39 -04:00
..
address.cpp Take lokimq::address as connect_remote argument 2020-06-30 13:09:34 -03:00
address.h Take lokimq::address as connect_remote argument 2020-06-30 13:09:34 -03:00
auth.cpp More header fixes 2020-06-22 20:02:03 -03:00
auth.h More header fixes 2020-06-22 20:02:03 -03:00
base32z.h Add missing <string> headers for libc++ 2020-05-15 01:32:29 -03:00
base64.h Add missing <string> headers for libc++ 2020-05-15 01:32:29 -03:00
batch.h Rename TaggedThread to TaggedThreadID, drop .name attribute 2020-06-07 21:28:53 -03:00
bt_serialize.cpp include fixes from iwyu 2020-06-22 16:23:04 -03:00
bt_serialize.h macOS 10.12 compatibility 2020-10-15 16:55:33 -03:00
bt_value.h Add C string bt_value ctor 2020-09-01 17:57:18 -03:00
connections.cpp cppzmq 4.7+ compatibility 2020-11-13 15:20:30 -04:00
connections.h include fixes from iwyu 2020-06-22 16:23:04 -03:00
hex.h Add missing <string> headers for libc++ 2020-05-15 01:32:29 -03:00
jobs.cpp Drop tagged thread init function; add synchronization dance 2020-06-07 21:28:53 -03:00
lokimq-internal.h Made `log()` callable publicly 2020-06-07 21:28:53 -03:00
lokimq.cpp Move socket holding into LokiMQ instance 2020-11-17 11:54:39 -04:00
lokimq.h Move socket holding into LokiMQ instance 2020-11-17 11:54:39 -04:00
message.h Require C++17 2020-05-12 15:33:59 -03:00
proxy.cpp Move socket holding into LokiMQ instance 2020-11-17 11:54:39 -04:00
string_view.h Require C++17 2020-05-12 15:33:59 -03:00
variant.h Fix var::get<I> to return references 2020-10-15 17:43:25 -03:00
version.h.in Add version to cmake, generate version header 2020-03-13 14:28:05 -03:00
worker.cpp cppzmq 4.7+ compatibility 2020-11-13 15:20:30 -04:00