Can't declare variable after goto.

This commit is contained in:
Bartosz Taudul 2017-09-15 21:09:19 +02:00
parent 19f67504b1
commit 01f63c8d7c

View File

@ -56,12 +56,14 @@ void View::Worker()
if( m_shutdown.load( std::memory_order_relaxed ) ) return; if( m_shutdown.load( std::memory_order_relaxed ) ) return;
if( !m_sock.Connect( m_addr.c_str(), "8086" ) ) continue; if( !m_sock.Connect( m_addr.c_str(), "8086" ) ) continue;
std::chrono::time_point<std::chrono::high_resolution_clock> t0;
uint8_t lz4; uint8_t lz4;
if( !m_sock.Read( &m_timeBegin, sizeof( m_timeBegin ), &tv, ShouldExit ) ) goto close; if( !m_sock.Read( &m_timeBegin, sizeof( m_timeBegin ), &tv, ShouldExit ) ) goto close;
if( !m_sock.Read( &lz4, sizeof( lz4 ), &tv, ShouldExit ) ) goto close; if( !m_sock.Read( &lz4, sizeof( lz4 ), &tv, ShouldExit ) ) goto close;
auto t0 = std::chrono::high_resolution_clock::now(); t0 = std::chrono::high_resolution_clock::now();
uint64_t bytes = 0; uint64_t bytes = 0;
for(;;) for(;;)