A Historical Server connection can only be involved with one session at a time. You can either be defining a recording session, or defining and executing a playback session, but you cannot mix together commands for multiple sessions. That is, if you start a recording session definition with the hs_create_recording_session command, you must finish the sequence of commands to define that session (or cancel the session) before you can start to define a playback session or a new recording session.
Defining a recording session is not the same thing as a recording session in progress. The user who defines a recording session is connected to and actively communicating with Historical Server during definition of a recording session. The user does not actively communicate with Historical Server during the actual recording. Any user connections are irrelevant during recording. For example, a user might connect to Historical Server at 3 p.m., define a recording session that starts at 10 p.m., and then disconnect from Historical Server. At 10 p.m., it is irrelevant whether the user is connected to Historical Server; the recording session takes place if Historical Server is running.
A playback session, however, requires the user connection during both playback definition and playback execution. To cancel playback execution and allow the user connection to perform some other communication, the user must issue the hs_terminate_playback command.