diff options
| author | Thiago Macieira <thiago.macieira@intel.com> | 2023-05-16 09:40:32 -0700 |
|---|---|---|
| committer | Thiago Macieira <thiago.macieira@intel.com> | 2023-05-26 06:46:33 -0700 |
| commit | 432d67b43fe5b8dccb2fc13be63d4ee48ae7b71e (patch) | |
| tree | 5bea6c0018a5d8afdfd7c6283323b0406ed1692c /src/gui/doc/snippets/plaintextlayout/window.cpp | |
| parent | 5ecdce0c352d924962f8cd79f2c0bea7f078ddf1 (diff) | |
QDnsLookup: add TimeoutError for timeouts
We were getting InvalidReplyError because it was simply unknown, which
is not very useful. Previously, the Unix code used res_nquery(), which
does not return timeouts as a condition. It returns -1 if a timeout did
happen, but the content in errno could be a left-over from a previous
timeout (see the "Not a typewriter"[1] problem).
With the rewrite to using res_nmkquery() and res_nsend() from the
previous commits, we can rely on errno being set properly by
res_nsend().
$ $objdir/tests/manual/qdnslookup/qdnslookup @0.0.0.1
; <<>> QDnsLookup 6.6.0 <<>> qdnslookup @0.0.0.1
;; status: TimeoutError (Request timed out)
;; QUESTION:
;qt-project.org IN A
;; Query time: 10008 ms
;; SERVER: 0.0.0.1#53
Tested on FreeBSD, Linux, macOS, and Windows.
[1] https://en.wikipedia.org/wiki/Not_a_typewriter
Change-Id: I3e3bfef633af4130a03afffd175e31958247f9b1
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/plaintextlayout/window.cpp')
0 files changed, 0 insertions, 0 deletions
