Close, but $status will either say:

disconnected, connecting, or connected.

So if (!$status) will always be $false.

So in the case of a new status window, if it's not connected yet $status will have value disconnected, so you should check for that.


Gone.