1

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.

Zahovay
  • 135
  • 9
  • I do not understand you, you behaved quite differently while you could have just answered the questions I asked. All of them. I appreciate 5 minutes of your work that helped me clear the knowledge I collected in a whole year. It actually helped. I'll save this portal I never heard of, its quite awesome. – Zahovay Jan 27 '21 at 09:34
  • 1
    It does help thank you, though I would like to clarify that I think I had one question at the very last sentence. The previous was provided to help you understand what makes my confusion because security is a wide broad problem. But I understand your point I'll try to strict to it. – Zahovay Jan 27 '21 at 10:42

0 Answers0