Skip to content

Commit 452b394

Browse files
committed
Fix bind
1 parent 3328f28 commit 452b394

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bee/socket/lua_socket.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl LuaSocket {
8787
}
8888
}
8989

90-
async fn bind(&mut self, addr: String, port: i32) -> LuaResult<()> {
90+
async fn bind(&mut self, addr: String, port: i32) -> LuaResult<bool> {
9191
match self.socket_type {
9292
SocketType::Tcp => {
9393
let addr = format!("{}:{}", addr, port);
@@ -97,7 +97,7 @@ impl LuaSocket {
9797
.lock()
9898
.unwrap()
9999
.insert_socket_stream(self.fd, stream);
100-
Ok(())
100+
Ok(true)
101101
}
102102
#[cfg(unix)]
103103
SocketType::Unix => {
@@ -107,7 +107,7 @@ impl LuaSocket {
107107
.lock()
108108
.unwrap()
109109
.insert_socket_stream(self.fd, stream);
110-
Ok(())
110+
Ok(true)
111111
}
112112
_ => Err(mlua::Error::RuntimeError("Invalid fd".to_string())),
113113
}

0 commit comments

Comments
 (0)