abstract_tcp_server2: fix race on shutdown

This commit is contained in:
moneromooo-monero 2018-07-11 22:02:28 +01:00
parent eed4dba880
commit 979105b298
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
2 changed files with 9 additions and 1 deletions

View file

@ -158,6 +158,7 @@ namespace net_utils
std::list<boost::shared_ptr<connection<t_protocol_handler> > > m_self_refs; // add_ref/release support
critical_section m_self_refs_lock;
critical_section m_chunking_lock; // held while we add small chunks of the big do_send() to small do_send_chunk()
critical_section m_shutdown_lock; // held while shutting down
t_connection_type m_connection_type;