diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -15,6 +15,8 @@ #include "address.h" #include "packet.h" +#include + /** The states of sending the packets. */ enum SendPacketsState { SPS_CLOSED, ///< The connection got closed. @@ -61,8 +63,8 @@ public: */ class TCPConnecter { private: - bool connected; ///< Whether we succeeded in making the connection - bool aborted; ///< Whether we bailed out (i.e. connection making failed) + std::atomic connected;///< Whether we succeeded in making the connection + std::atomic aborted; ///< Whether we bailed out (i.e. connection making failed) bool killed; ///< Whether we got killed SOCKET sock; ///< The socket we're connecting with