Fixed timeout problem when Socket object is created in client