Closing both rx and tx pipe before closing