daemon: Fix deadlock on WebSocket error