<table><tr><td style="">dfaure created this revision.<br />dfaure added reviewers: dvratil, vkrause.<br />Restricted Application added a project: KDE PIM.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D9264" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>If serverStateChanged(Running) is called twice, the first time<br />
this would hide the overlay and set mOverlayActive=false,<br />
so the second time this goes into the else branch, which<br />
shows the overlay...</p>

<p>The reason it's called twice isn't because ServerManager<br />
emits stateChanged(Running) twice, obviously (it only emits on actual<br />
change). The reason is that the ErrorOverlay constructor calls<br />
serverStateChanged(state) and connects to &ServerManager::stateChanged.<br />
It can happen that for this initial state, ServerManager::state() finds<br />
out "Running" before ServerManager gets a chance to notice by itself<br />
and emit stateChanged().</p>

<p>BUG: 379997</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Found with debug output, during session startup,<br />
over many weeks (it's clearly a race condition).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R165 Akonadi </div></div></div><br /><div><strong>BRANCH</strong><div><div>erroroverlay</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9264" rel="noreferrer">https://phabricator.kde.org/D9264</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/widgets/erroroverlay.cpp</div></div></div><br /><div><strong>To: </strong>dfaure, dvratil, vkrause<br /><strong>Cc: </strong>KDE PIM, dvasin, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>