formatting

This commit is contained in:
Eric 2025-01-22 19:44:39 +11:00
parent 57dc968486
commit 39e5d507e0
No known key found for this signature in database
2 changed files with 4 additions and 7 deletions

View File

@ -130,11 +130,9 @@ method stop*(node: NodeProcess, expectedErrCode: int = -1) {.base, async.} =
trace "waiting for node process to exit"
let exitCode = await node.process.waitForExit(3.seconds)
if exitCode > 0 and
exitCode != 143 and # 143 = SIGTERM (initiated above)
exitCode != expectedErrCode:
if exitCode > 0 and exitCode != 143 and # 143 = SIGTERM (initiated above)
exitCode != expectedErrCode:
error "failed to exit process, check for zombies", exitCode
except CancelledError as error:
raise error
except CatchableError as e:

View File

@ -1,8 +1,7 @@
import pkg/chronos
import pkg/codex/logutils
proc nextFreePort*(startPort: int): Future[int] {.async: (raises:[CancelledError]).} =
proc nextFreePort*(startPort: int): Future[int] {.async: (raises: [CancelledError]).} =
proc client(server: StreamServer, transp: StreamTransport) {.async.} =
await transp.closeWait()
@ -22,4 +21,4 @@ proc nextFreePort*(startPort: int): Future[int] {.async: (raises:[CancelledError
trace "port is not free", port
inc port
except TransportAddressError:
raiseAssert "bad address"
raiseAssert "bad address"