close raw output socket when finished