mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
fix Issue 22791 - std\socket.d(790) Heisenbug random failure (#8388)
This commit is contained in:
parent
6389953fa0
commit
1a3e80ec25
1 changed files with 12 additions and 5 deletions
17
std/socket.d
17
std/socket.d
|
@ -787,13 +787,20 @@ class InternetHost
|
|||
assert(ih.name == "www.digitalmars.com" || ih.name == "digitalmars.com",
|
||||
ih.name);
|
||||
|
||||
assert(ih.getHostByAddr(ih.addrList[0]));
|
||||
string getHostNameFromInt = ih.name.dup;
|
||||
/* The following assert randomly fails in the test suite.
|
||||
* https://issues.dlang.org/show_bug.cgi?id=22791
|
||||
* So just ignore it when it fails.
|
||||
*/
|
||||
//assert(ih.getHostByAddr(ih.addrList[0]));
|
||||
if (ih.getHostByAddr(ih.addrList[0]))
|
||||
{
|
||||
string getHostNameFromInt = ih.name.dup;
|
||||
|
||||
assert(ih.getHostByAddr(ia.toAddrString()));
|
||||
string getHostNameFromStr = ih.name.dup;
|
||||
assert(ih.getHostByAddr(ia.toAddrString()));
|
||||
string getHostNameFromStr = ih.name.dup;
|
||||
|
||||
assert(getHostNameFromInt == getHostNameFromStr);
|
||||
assert(getHostNameFromInt == getHostNameFromStr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue