Skip to content

Commit

Permalink
debug assertion on ipc sending shm fd wildly wrong
Browse files Browse the repository at this point in the history
The problem was much worse than what I had thought in my last commit.
So, I took a different strategy: instead of trying to assert which codes
didn't contain the shm file descriptor, I am now asserting they aren't a
code that *does* contain a file descriptor.
  • Loading branch information
LGFae committed Aug 8, 2024
1 parent 227f83e commit 8d347f6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions common/src/ipc/transmit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,7 @@ impl<T> IpcSocket<T> {

let shm = if len == 0 {
debug_assert!(
matches!(
code,
Code::ReqClear | Code::ReqImg | Code::ResInfo | Code::ReqPing | Code::ReqQuery
),
!matches!(code, Code::ReqImg | Code::ReqClear | Code::ResInfo),
"Received: Code {:?}, which should have sent a shm fd",
code
);
Expand Down

0 comments on commit 8d347f6

Please sign in to comment.