Fixed server issue when the establishment of connection is not successful