Make use socket is up before creating Client