Ejemplo n.º 1
0
 /// <summary>
 /// Disconnect from the FTP Server
 /// </summary>
 /// <returns>true if disconnected succeeded, otherwise false</returns>
 public override void Disconnect()
 {
     // Close the handles
     if (!WinInet.InternetCloseHandle(m_hFtp))
     {
         // ignore as this can commonly happen if the connection
         //was never properly established
     }
     else if (!WinInet.InternetCloseHandle(m_hInternet))
     {
         // If the handles didn't close, this is very unexpected and bad
         Debug.Assert(false,
                      "Disconnect couldn't close the Internet handle in " + GetType().ToString());
     }
 }