add function that when server is disconnected,the progress and status should be changed