Skip to content

Commit

Permalink
feat: improve RtmpClientStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
josephnhtam committed Oct 1, 2024
1 parent bc2cc7d commit 1b903bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/LiveStreamingServerNet.Rtmp.Client/Internal/RtmpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public RtmpClient(
{
_ when _clientTcs.Task.IsCompleted => RtmpClientStatus.Stopped,
_ when _connected => RtmpClientStatus.Connected,
_ when _handshakeTcs.Task.IsCompletedSuccessfully => RtmpClientStatus.HandshakeCompleted,
_ when _clientTask != null => RtmpClientStatus.Connecting,
_ when _handshakeTcs.Task.IsCompletedSuccessfully => RtmpClientStatus.Connecting,
_ when _clientTask != null => RtmpClientStatus.Handshaking,
_ => RtmpClientStatus.None
};

Expand Down
9 changes: 4 additions & 5 deletions src/LiveStreamingServerNet.Rtmp.Client/RtmpClientStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
public enum RtmpClientStatus
{
None = 0,
Connecting = 1,
HandshakeStarted = 2,
HandshakeCompleted = 3,
Connected = 4,
Stopped = 5
Handshaking = 1,
Connecting = 2,
Connected = 3,
Stopped = 4
}
}

0 comments on commit 1b903bc

Please sign in to comment.