23
b3b3
7y

So I'm working on an CLI right now that fetches data from a website and downloads other stuff based on that data etc bla bla. And since its async it can fully taste my whole internet speed (130Mb/s).

So everything's good and I started working on a new feature. I started the app and it worked... For 3 minutes. After that it just stopped. It didn't even freeze or anything. After 2 hours of debugging and 3 cans of coffee I was so frustrated I just wanted to watch some YouTube and relax. That's the moment I realized I didn't even have internet. I hate my ISP...

Comments
  • 2
    but usually service returned / throw error 4 while not connected to internet.. strange you didn't notice.
    😂😂
  • 1
    @abcdev Once a request didn't return 200 it should print error messages. But it didn't return anything lol I thought 408 was when the client took to long to send the request but as I said...
  • 1
    @abcdev oh... You can't take too long (or receive a return status code) if you aren't connected at all 😑but at least some other error would have been nice. Should have done that in some other language but c++ is the only one I know good enough
  • 1
    @b3b3 Yeah, that's with the low level languages. You must consider every possible thing that could happen. In this case, no internet. I don't think TCP implements any kind of handshacking, so there's no errors directly from socket. It just wait that you or the server (that may or may not exist) sends a message and just passes that forward. In HTTP there's always a response after request so a simple timeout will do just fine.
Add Comment