shutdown for packet writer and reader