After this code is ran I get some pretty strange messange on the command line. (However it happens in every application where I write URLSession datatask. (This is the simplest one that reproduce the problem)
Facts:{
iOS: 13.6 (though version does not matter, happened to me in every version.
Xcode: 11.6 (also does not matter at all)
}
func getTemperatureWarning(){
let url = URL(string: "https://urlhere:2222/getTemperatureWarning") // checking settings on server
var request = URLRequest(url: url!)
request.httpMethod = "GET"
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
_ = URLSession.shared.dataTask(with: request){data, response, error in
if error != nil || data == nil {
print("Client error!")
return
}
guard let response = response as? HTTPURLResponse, response.statusCode == 200 else {
fatalError("failed!")
}
do {
let json = try JSONDecoder().decode(TempWarning.self, from: data!)
print(json.value)
DispatchQueue.main.async {
// not yet implemented
}
} catch let error {
print(error)
}
}.resume()
}
CommandLine:
25
2020-07-23 11:54:28.859871+0200 cameden[36484:2032497] [] tcp_input [C2.1.1:3] flags=[R] seq=3143354417, ack=0, win=0 state=LAST_ACK rcv_nxt=3143354417, snd_una=3725130175 2020-07-23
11:54:28.860170+0200 cameden[36484:2032497] [] tcp_input [C2.1.1:3] flags=[R] seq=3143354417, ack=0, win=0 state=CLOSED rcv_nxt=3143354417, snd_una=3725130175
Anybody has any clue what is it about, or how can I dive more deep into it? Is it an error or something that helps me acknowledge there is no error? 25 at the begining is the answer from my python3 flask server. That is the value I'm looking for. After that number there is a two line message which I dont understand. It also happens when I try to access 3rd party servers like twitter API or whatever.