Problem: race conditions for options.linger (#2910)

* Problem: race conditions for options.linger

Solution: make options.linger atomic
This commit is contained in:
Simon Giesecke
2018-02-08 23:10:45 +01:00
committed by Luca Boccassi
parent de0c669323
commit a1d55d0506
7 changed files with 178 additions and 88 deletions

View File

@@ -34,6 +34,7 @@
#include <vector>
#include <set>
#include "atomic_ptr.hpp"
#include "stddef.h"
#include "stdint.hpp"
#include "tcp_address.hpp"
@@ -100,7 +101,7 @@ struct options_t
int type;
// Linger time, in milliseconds.
int linger;
atomic_value_t linger;
// Maximum interval in milliseconds beyond which userspace will
// timeout connect().