Connected after everything is initialized

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