fix copyOut close hanging bug
Merge pull request #161 from epgrubmair/master

fix copyOut close hanging bug