add end() when ws write end