oxen-mq/oxenmq
Jason Rhinelander ad04c53c0e
Simplify conn index handling (#41)
The existing code was overly complicated by trying to track indices in
the `connections` vector, which complication happening because things
get removed from `connections` requiring all the internal index values
to be updated.  So we ended up with a connection ID inside the
ConnectionID object, plus a map of those connection IDs to the
`connections` index, and need a map back from indices to ConnectionIDs.

Though this seems to work usually, I recently noticed an
oxen-storage-server sending oxend requests on the wrong connection and
so I suspect there is some rare edge cases here where a failed
connection index might not be updated properly.

This PR simplifies the whole thing by making getting rid of connection
ids entirely and keeping the connections in a map (with connection ids
that never change).  This might end up being a little less efficient
than the vector, but it's unlikely to matter and the added complexity
isn't worth it.
2021-06-23 17:51:25 -03:00
..
address.cpp Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
address.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
auth.cpp Simplify conn index handling (#41) 2021-06-23 17:51:25 -03:00
auth.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
base32z.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
base64.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
batch.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
bt_serialize.cpp Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
bt_serialize.h Add `is_unsigned_integer` to bt_{dict,list}_consumer 2021-06-08 00:58:20 -03:00
bt_value.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
byte_type.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
connections.cpp Simplify conn index handling (#41) 2021-06-23 17:51:25 -03:00
connections.h Simplify conn index handling (#41) 2021-06-23 17:51:25 -03:00
hex.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
jobs.cpp Add thread-safe timerid assignment version of add_timer() 2021-05-25 17:29:25 -03:00
message.h Minor doc fix 2021-06-02 13:16:19 -03:00
oxenmq-internal.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
oxenmq.cpp Add support for listening after startup 2021-06-23 10:51:08 -03:00
oxenmq.h Simplify conn index handling (#41) 2021-06-23 17:51:25 -03:00
proxy.cpp Simplify conn index handling (#41) 2021-06-23 17:51:25 -03:00
variant.h Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
version.h.in Bump (and cmake-modernize) version 2021-04-15 15:15:44 -03:00
worker.cpp Simplify conn index handling (#41) 2021-06-23 17:51:25 -03:00