MCPcopy Create free account
hub / github.com/BitVM/BitVM / disconnect

Function disconnect

bridge/src/client/data_store/ftp/lib.rs:389–404  ·  view source on GitHub ↗
(
    insecure_ftp_stream: Option<&mut AsyncFtpStream>,
    secure_ftp_stream: Option<&mut AsyncNativeTlsFtpStream>,
)

Source from the content-addressed store, hash-verified

387}
388
389async fn disconnect(
390 insecure_ftp_stream: Option<&mut AsyncFtpStream>,
391 secure_ftp_stream: Option<&mut AsyncNativeTlsFtpStream>,
392) {
393 if insecure_ftp_stream.is_some() {
394 match insecure_ftp_stream.unwrap().quit().await {
395 Ok(_) => {}
396 Err(err) => eprintln!("Unable to close FTP connection: {}", err),
397 }
398 } else if secure_ftp_stream.is_some() {
399 match secure_ftp_stream.unwrap().quit().await {
400 Ok(_) => {}
401 Err(err) => eprintln!("Unable to close FTPS connection: {}", err),
402 }
403 }
404}
405
406async fn change_directory(
407 insecure_ftp_stream: Option<&mut AsyncFtpStream>,

Callers 4

test_connectionFunction · 0.70
list_objectsFunction · 0.70
get_objectFunction · 0.70
upload_fileFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_connectionFunction · 0.56