Skip to content

Commit 9302ab3

Browse files
committed
Keep session active for explicit disconnect and refresh timeout docs
1 parent e5e49e3 commit 9302ab3

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ Behavior notes:
427427
- `--coalesce-cmaf-chunks` disables that split and falls back to one media object per group
428428
- when multiple tracks are subscribed, matching objects are served in publish-plan order so time-aligned audio/video stay interleaved instead of draining one track before the next
429429
- `--forward 1` proactively publishes tracks and objects after namespace setup completes
430-
- `--timeout <seconds>` controls how long the publisher waits for inbound `SUBSCRIBE` requests; the default is 3 seconds
430+
- `--timeout <seconds>` controls how long the publisher waits for inbound `SUBSCRIBE` requests; the default is 30 seconds
431431
- `--sni <value>` overrides the TLS SNI sent to the relay, which is useful when `--endpoint` uses a raw IP address; WebTransport still sends HTTP authority from the configured endpoint host
432432
- `--paced` applies pacing only to media-object sends; setup and publish control messages are sent immediately
433433
- `OPENMOQ_PICOQUIC_TRACE_CSV=/path/file.csv` is optional and only writes CSV output when `OPENMOQ_PICOQUIC_TRACE` is also set; rows include `pacing_before`, `pacing_after`, `enqueue`, and `served`/`sent` events for media objects

docs/publisher-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ config.include_sap = false;
3030
config.split_cmaf_chunks = true;
3131
config.paced = false;
3232
config.loop = false;
33-
config.subscriber_timeout = std::chrono::seconds(3);
33+
config.subscriber_timeout = std::chrono::seconds(30);
3434

3535
openmoq::publisher::Publisher publisher(config);
3636
```
@@ -266,7 +266,7 @@ int main() {
266266
config.draft_version = DraftVersion::kDraft14;
267267
config.track_namespace = "media";
268268
config.split_cmaf_chunks = true;
269-
config.subscriber_timeout = std::chrono::seconds(3);
269+
config.subscriber_timeout = std::chrono::seconds(30);
270270

271271
Publisher publisher(config);
272272

src/publisher_api.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ transport::TransportStatus Publisher::publish(const PreparedPublish& prepared,
150150
status = active->session->publish(materialized);
151151
if (!status.ok) {
152152
const std::string error = "transport publish failed: " + status.message;
153+
static_cast<void>(active->session->close(0));
153154
clear_active_session(active, true, error);
154155
return transport::TransportStatus::failure(error);
155156
}
@@ -161,7 +162,6 @@ transport::TransportStatus Publisher::publish(const PreparedPublish& prepared,
161162
stats_.groups_published = batch_stats.groups_published;
162163
}
163164

164-
clear_active_session(active, true, "");
165165
return transport::TransportStatus::success();
166166
}
167167

@@ -216,6 +216,7 @@ transport::TransportStatus Publisher::publish_live(std::istream& input,
216216
status = active->session->publish_live(input, config_.draft_version, config_.split_cmaf_chunks);
217217
if (!status.ok) {
218218
const std::string error = "transport live publish failed: " + status.message;
219+
static_cast<void>(active->session->close(0));
219220
clear_active_session(active, true, error);
220221
return transport::TransportStatus::failure(error);
221222
}
@@ -227,7 +228,6 @@ transport::TransportStatus Publisher::publish_live(std::istream& input,
227228
stats_.groups_published = live_stats.groups_published;
228229
}
229230

230-
clear_active_session(active, true, "");
231231
return transport::TransportStatus::success();
232232
}
233233

0 commit comments

Comments
 (0)