compio-rs / compio

A thread-per-core Rust runtime with IOCP/io_uring/polling.
MIT License
420 stars 37 forks source link

poor TcpListener doctest #266

Closed AsakuraMizu closed 4 months ago

AsakuraMizu commented 4 months ago

The doctest for TcpListener: https://github.com/compio-rs/compio/blob/9939253f42a171d701d94ff6e2ca9ed4dd5865d4/compio-net/src/tcp.rs#L18-L40 contains an issue that it binds to a fixed port and do no cleanup. This causes that when running tests locally, after the first run I have to wait for a minute for another run to let the system do cleanup or it will fail due to Address already in use.