code style
implement close

Signed-off-by: Jack <jack.wgm@gmail.com>
improve close

Signed-off-by: Jack <jack.wgm@gmail.com>