Connected after everything is initialized

Assuming there are two concurrent threads A, B.

If A sets 
<code>
connected = true;
</code> 
B gets into 
<code>
else if (!connection.isSpdy()) {
connection.updateReadTimeout(client.getReadTimeout());
</code> 
before A initializes Socket/SpdyConnection, there will be something bad happen.