File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -696,19 +696,23 @@ impl Multi {
696
696
}
697
697
}
698
698
699
- /// Attempt to close the multi handle and clean up all associated resources.
699
+ /// Does nothing and returns `Ok(())`. This method remains for backwards
700
+ /// compatibility.
700
701
///
701
- /// Cleans up and removes a whole multi stack. It does not free or touch any
702
- /// individual easy handles in any way - they still need to be closed
703
- /// individually.
702
+ /// This method will be changed to take `self` in a future release.
703
+ #[ doc( hidden) ]
704
704
pub fn close ( & self ) -> Result < ( ) , MultiError > {
705
- unsafe { cvt ( curl_sys :: curl_multi_cleanup ( self . raw ) ) }
705
+ Ok ( ( ) )
706
706
}
707
707
708
708
/// Get a pointer to the raw underlying CURLM handle.
709
709
pub fn raw ( & self ) -> * mut curl_sys:: CURLM {
710
710
self . raw
711
711
}
712
+
713
+ unsafe fn close_impl ( & self ) -> Result < ( ) , MultiError > {
714
+ cvt ( curl_sys:: curl_multi_cleanup ( self . raw ) )
715
+ }
712
716
}
713
717
714
718
fn cvt ( code : curl_sys:: CURLMcode ) -> Result < ( ) , MultiError > {
@@ -727,7 +731,7 @@ impl fmt::Debug for Multi {
727
731
728
732
impl Drop for Multi {
729
733
fn drop ( & mut self ) {
730
- let _ = self . close ( ) ;
734
+ let _ = unsafe { self . close_impl ( ) } ;
731
735
}
732
736
}
733
737
You can’t perform that action at this time.
0 commit comments