-- Adding a fix for waiting till client socket is connected