Handle error from ibrowse and close the connection