rearrange
check if ws connection established before calling .Close()
give up if no client connected within 3 seconds