Add checks, to prevent sending data to closed websocket connections.