Skip to content

Commit

Permalink
Make nudge threadsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
kp-mariappan-ramasamy committed Nov 27, 2024
1 parent a00a4ff commit b459063
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/he/he_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ struct he_conn {
bool is_server;

/// Client State
he_conn_state_t state;
_Atomic he_conn_state_t state;

/// Pointer to incoming data buffer
uint8_t *incoming_data;
Expand All @@ -157,7 +157,7 @@ struct he_conn {
// WolfSSL stuff
WOLFSSL *wolf_ssl;
/// Wolf Timeout
int wolf_timeout;
_Atomic int wolf_timeout;
/// Write buffer
uint8_t write_buffer[HE_MAX_WIRE_MTU];
/// Packet seen
Expand All @@ -178,7 +178,7 @@ struct he_conn {
bool renegotiation_due;

/// Do we already have a timer running? If so, we don't want to generate new callbacks
bool is_nudge_timer_running;
_Atomic bool is_nudge_timer_running;

he_plugin_chain_t *inside_plugins;
he_plugin_chain_t *outside_plugins;
Expand Down

0 comments on commit b459063

Please sign in to comment.