diff --git a/rust/src/nasl/builtin/network/socket.rs b/rust/src/nasl/builtin/network/socket.rs index f1387d35f..e9305e3e1 100644 --- a/rust/src/nasl/builtin/network/socket.rs +++ b/rust/src/nasl/builtin/network/socket.rs @@ -432,7 +432,7 @@ impl NaslSockets { // TODO: set timeout to global recv timeout * 2 when available let timeout = convert_timeout(timeout).unwrap_or(Duration::from_secs(10)); // TODO: for every vhost - let vhosts = vec!["localhost"]; + let vhosts = ["localhost"]; let sockets: Vec> = vhosts .iter() .map(|vhost| { @@ -443,7 +443,7 @@ impl NaslSockets { Ok(NaslValue::Fork( sockets .into_iter() - .filter_map(|socket| socket) + .flatten() .map(|socket| { let fd = self.add(socket); NaslValue::Number(fd as i64)