Skip to content

Commit 5a19abf

Browse files
committed
fix: accept call should return std::io::result
Fixes a compiler error when attempting to use the accept function as the return signature was not complete Signed-off-by: Karsten Becker <567973+KarstenB@users.noreply.github.com>
1 parent 33c0348 commit 5a19abf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/asynchronous/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,13 @@ impl Server {
171171
Ok(())
172172
}
173173

174-
pub fn accept(&mut self, conn: Socket) -> Connection<impl Builder> {
174+
pub async fn accept(&mut self, conn: Socket) -> std::io::Result<()> {
175175
let delegate = ServerBuilder {
176176
services: self.services.clone(),
177177
streams: Arc::default(),
178178
shutdown_waiter: self.shutdown.subscribe(),
179179
};
180-
Connection::new(conn, delegate)
180+
Connection::new(conn, delegate).run().await
181181
}
182182

183183
pub async fn shutdown(&mut self) -> Result<()> {

0 commit comments

Comments
 (0)