Close active WebSockets on server before shutdown