unsubscribe(sub)

    Called when a subscriber disconnects. The server provides a single argument sub which is the Lua table returned from the subscribe function. It does not accept any return value.

    function unsubscribe(sub)
      -- Client has unsubscribed (disconnected) from the SSE server.
    end