ios - Temporary nw_socket_connect connect failed after delete request -
i have table view, calling function deletes entry remotely after deleted in table view. however, after delete entry , navigate away view, 20 seconds after, navigating table view gives me following error:
nw_socket_connect connect failed: [64] host down
the other data being requested on table view being loaded correctly, know host not down. here code.
let url:url = url(string: urlstring)! let session = urlsession.shared var request = urlrequest(url: url) request.httpmethod = "delete" let task = session.datatask(with: request urlrequest) { ( data, response, error) in guard let data = data, let _:urlresponse = response, error == nil else { print("error") return } let datastring = string(data: data, encoding: string.encoding.utf8) print(datastring) } task.resume()
this code called in:
tableview(_ tableview: uitableview, commit editingstyle: uitableviewcelleditingstyle, forrowat indexpath: indexpath)
any advice appreciated!
Comments
Post a Comment