mirror of
https://github.com/upa/mscp.git
synced 2026-02-13 08:34:41 +08:00
fix cleanup
This commit is contained in:
@@ -44,10 +44,9 @@ class mscp:
|
||||
self.stop()
|
||||
if self.state == _STATE_STOPPED:
|
||||
self.join()
|
||||
if self.state == _STATE_JOINED:
|
||||
self.cleanup()
|
||||
if self.state == _STATE_CLEANED:
|
||||
self.free()
|
||||
|
||||
self.cleanup()
|
||||
self.free()
|
||||
|
||||
def _state2str(self):
|
||||
return _state_str[self.state]
|
||||
|
||||
@@ -571,6 +571,11 @@ static void free_chunk(struct list_head *list)
|
||||
|
||||
void mscp_cleanup(struct mscp *m)
|
||||
{
|
||||
if (m->first) {
|
||||
ssh_sftp_close(m->first);
|
||||
m->first = NULL;
|
||||
}
|
||||
|
||||
release_list(&m->src_list, free_src);
|
||||
INIT_LIST_HEAD(&m->src_list);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user