We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 700856f commit 24a2933Copy full SHA for 24a2933
src/main/java/org/xbill/DNS/TCPClient.java
@@ -112,7 +112,7 @@ private byte[] _recv(int length) throws IOException {
112
throw new EOFException();
113
}
114
nrecvd += (int) n;
115
- if (nrecvd < length && System.currentTimeMillis() > endTime) {
+ if (nrecvd < length && endTime - System.nanoTime() < 0) {
116
throw new SocketTimeoutException();
117
118
} else {
0 commit comments