File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/Smdn.Net.SkStackIP/Smdn.Net.SkStackIP Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -158,11 +158,17 @@ public void ThrowIfPanaSessionAlreadyEstablished()
158158 /// <exception cref="SkStackPanaSessionStateException">
159159 /// Cannot determine the current status of the PANA session.
160160 /// </exception>
161+ #if SYSTEM_DIAGNOSTICS_CODEANALYSIS_MEMBERNOTNULLATTRIBUTE
162+ [ MemberNotNull ( nameof ( PanaSessionPeerAddress ) ) ]
163+ #endif
161164 public void ThrowIfPanaSessionNotAlive ( )
162165 {
163166 _ = PanaSessionState switch {
164167 // established
165- SkStackEventNumber . PanaSessionEstablishmentCompleted => default ( int ) , // throws nothing
168+ SkStackEventNumber . PanaSessionEstablishmentCompleted
169+ => PanaSessionPeerAddress
170+ // inconsistency in internal state
171+ ?? throw new InvalidOperationException ( $ "{ nameof ( PanaSessionPeerAddress ) } is set.") ,
166172
167173 // not established yet
168174 SkStackEventNumber . Undefined
You can’t perform that action at this time.
0 commit comments