Skip to content

Conversation

benschumacher
Copy link

This changeset fixes two issues I observed in rtl_tcp:

  1. fix a memory leak that occurs when a client disconnects from the server.
  2. refines the shutdown code by clarifying the behavior around do_exit and introducing a new conn_reset boolean.

To facilitate the latter change, this binary requires C11 to allow the use of atomic types.

@petersloan
Copy link

Any chance this can get merged?

static int llbuf_num = 500;

static volatile int do_exit = 0;
atomic_bool do_exit = false;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the static is remove? It looks like the variable is still only used within this file.


static volatile int do_exit = 0;
atomic_bool do_exit = false;
atomic_bool conn_reset = false;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this one be static too?

@pinkavaj
Copy link
Owner

pinkavaj commented Jan 5, 2025

Btw it might be worth send this to https://github.com/librtlsdr/librtlsdr (I use it as an upstream, so the update will get here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants