mirror of
https://github.com/status-im/nim-chronos.git
synced 2025-02-20 15:08:13 +00:00
Fix compilation warnings in osnet.nim
Fix non stable stream tests.
This commit is contained in:
parent
cd2571e80a
commit
ec7f2a14a8
@ -1173,35 +1173,6 @@ elif defined(windows):
|
||||
import winlean, dynlib
|
||||
|
||||
const
|
||||
IfOperStatusUp = cint(1)
|
||||
IfOperStatusDown = cint(2)
|
||||
IfOperStatusTesting = cint(3)
|
||||
IfOperStatusUnknown = cint(4)
|
||||
IfOperStatusDormant = cint(5)
|
||||
IfOperStatusNotPresent = cint(6)
|
||||
IfOperStatusLowerLayerDown = cint(7)
|
||||
|
||||
IpPrefixOriginOther = cint(0)
|
||||
IpPrefixOriginManual = cint(1)
|
||||
IpPrefixOriginWellKnown = cint(2)
|
||||
IpPrefixOriginDhcp = cint(3)
|
||||
IpPrefixOriginRouterAdvertisement = cint(4)
|
||||
IpPrefixOriginUnchanged = cint(1) shl 4
|
||||
|
||||
IpSuffixOriginOther = cint(0)
|
||||
IpSuffixOriginManual = cint(1)
|
||||
IpSuffixOriginWellKnown = cint(2)
|
||||
IpSuffixOriginDhcp = cint(3)
|
||||
IpSuffixOriginLinkLayerAddress = cint(4)
|
||||
IpSuffixOriginRandom = cint(5)
|
||||
IpSuffixOriginUnchanged = cint(1) shl 4
|
||||
|
||||
IpDadStateInvalid = cint(0)
|
||||
IpDadStateTentative = cint(1)
|
||||
IpDadStateDuplicate = cint(2)
|
||||
IpDadStateDeprecated = cint(3)
|
||||
IpDadStatePreferred = cint(4)
|
||||
|
||||
WorkBufferSize = 16384'u32
|
||||
MaxTries = 3
|
||||
|
||||
@ -1297,10 +1268,6 @@ elif defined(windows):
|
||||
dwForwardMetric4: uint32
|
||||
dwForwardMetric5: uint32
|
||||
|
||||
NET_LUID = object
|
||||
value: uint64
|
||||
info: uint64
|
||||
|
||||
SOCKADDR_INET {.union.} = object
|
||||
ipv4: Sockaddr_in
|
||||
ipv6: Sockaddr_in6
|
||||
|
@ -693,13 +693,16 @@ suite "Stream Transport test suite":
|
||||
discard
|
||||
|
||||
proc testWriteConnReset(address: TransportAddress): Future[int] {.async.} =
|
||||
var syncFut = newFuture[void]()
|
||||
proc client(server: StreamServer, transp: StreamTransport) {.async.} =
|
||||
await transp.closeWait()
|
||||
syncFut.complete()
|
||||
var n = 10
|
||||
var server = createStreamServer(address, client, {ReuseAddr})
|
||||
server.start()
|
||||
var msg = "HELLO"
|
||||
var ntransp = await connect(address)
|
||||
await syncFut
|
||||
while true:
|
||||
var res = await ntransp.write(msg)
|
||||
if res == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user