diff --git a/messaging/msgq.cc b/messaging/msgq.cc index 023b3b07fbe183..e821d15366a547 100644 --- a/messaging/msgq.cc +++ b/messaging/msgq.cc @@ -200,6 +200,10 @@ void msgq_init_subscriber(msgq_queue_t * q) { } } + for (size_t i = 0; i < NUM_READERS; i++){ + q->read_fifos[i] = -1; + } + q->read_fifo_path = "/dev/shm/fifo-"; q->read_fifo_path += std::to_string(q->read_uid_local); diff --git a/messaging/stress.py b/messaging/stress.py index 88573723a0a826..388477c7bec942 100644 --- a/messaging/stress.py +++ b/messaging/stress.py @@ -1,8 +1,4 @@ -import time -from messaging_pyx import Context, Poller, SubSocket, PubSocket # pylint: disable=no-name-in-module, import-error - -#21845 -#32767 after closing mmap fd +from messaging_pyx import Context, SubSocket, PubSocket # pylint: disable=no-name-in-module, import-error if __name__ == "__main__": c = Context() @@ -14,6 +10,5 @@ sub_sock = SubSocket() sub_sock.connect(c, "controlsState") - pub_sock.send(b'a') print(sub_sock.receive())