Skip to content

chore: set initial semantic version to v0.1.0#3

Merged
alxayo merged 2 commits intomainfrom
copilot/determine-semantic-version
Mar 2, 2026
Merged

chore: set initial semantic version to v0.1.0#3
alxayo merged 2 commits intomainfrom
copilot/determine-semantic-version

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

No semantic version was defined for this codebase — the binary defaulted to "dev" at runtime.

Changes

  • cmd/rtmp-server/flags.go: Set default version to "v0.1.0"; updated ldflags comment to match

Version rationale

Part Reason
0 (major) Pre-stable; scoped to 10–50 connections, no auth, spec still Draft
1 (minor) First feature-complete cut: handshake, chunking, AMF0, relay, FLV recording, event hooks
0 (patch) No patches on top of initial release
$ ./rtmp-server -version
v0.1.0

The value remains overridable at build time via -ldflags "-X main.version=vX.Y.Z".

Original prompt

what would be the apropriate sematic version for the current version of this source code ?

The user has attached the following file paths as relevant context:

  • .github\copilot-instructions.md

Created from VS Code.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: alxayo <2588978+alxayo@users.noreply.github.com>
Copilot AI changed the title [WIP] Determine appropriate semantic version for source code chore: set initial semantic version to v0.1.0 Mar 2, 2026
@alxayo alxayo marked this pull request as ready for review March 2, 2026 21:43
@alxayo alxayo merged commit 20630c3 into main Mar 2, 2026
1 check passed
@alxayo alxayo deleted the copilot/determine-semantic-version branch March 3, 2026 09:38
alxayo added a commit that referenced this pull request Mar 3, 2026
…dlock

Wire the disconnect handler in attachCommandHandling to perform full
cleanup when a connection's readLoop exits:

- Stop MediaLogger (prevents goroutine + ticker leak per connection)
- Close FLV recorder under stream.mu lock (safe with cleanupAllRecorders)
- Call PublisherDisconnected() to clear publisher reference (fixes stream
  key lockout where stale publishers block reuse via ErrPublisherExists)
- Call SubscriberDisconnected() to remove dead subscribers
- Call RemoveConnection() to remove from s.conns (fixes memory leak where
  connections accumulated forever, only cleared on server shutdown)
- Fire publish_stop/play_stop/connection_close hook events

Add role field to commandState (set to 'publisher'/'subscriber' by
OnPublish/OnPlay handlers) to determine cleanup path.

Add RemoveConnection(id) method to Server for single-connection removal.

Fix deadlock in Stop(): previously held s.mu.Lock() while calling
c.Close() -> wg.Wait(), but the disconnect handler's RemoveConnection()
also acquires s.mu.Lock(). Fix: collect connections, clear map, release
lock, then close connections outside the lock.

Resolves issues #1 (conn memory leak), #2 (stale publishers), #3 (stale
subscribers), #4 (MediaLogger leak), #6 (unclosed recorders) from spec 005.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants