@@ -400,13 +400,13 @@ internal void OnPacketReceived(SctpPacket packet)
400400 OnAbortReceived ? . Invoke ( abortReason ) ;
401401 break ;
402402
403- case var ct when ct == SctpChunkType . COOKIE_ACK && State != SctpAssociationState . CookieEchoed :
403+ case var _ when chunkType == SctpChunkType . COOKIE_ACK && State != SctpAssociationState . CookieEchoed :
404404 // https://tools.ietf.org/html/rfc4960#section-5.2.5
405405 // At any state other than COOKIE-ECHOED, an endpoint should silently
406406 // discard a received COOKIE ACK chunk.
407407 break ;
408408
409- case var ct when ct == SctpChunkType . COOKIE_ACK && State == SctpAssociationState . CookieEchoed :
409+ case var _ when chunkType == SctpChunkType . COOKIE_ACK && State == SctpAssociationState . CookieEchoed :
410410 SetState ( SctpAssociationState . Established ) ;
411411 CancelTimers ( ) ;
412412 _dataSender . StartSending ( ) ;
@@ -468,13 +468,13 @@ internal void OnPacketReceived(SctpPacket packet)
468468 SendChunk ( chunk ) ;
469469 break ;
470470
471- case var ct when ct == SctpChunkType . INIT_ACK && State != SctpAssociationState . CookieWait :
471+ case var _ when chunkType == SctpChunkType . INIT_ACK && State != SctpAssociationState . CookieWait :
472472 // https://tools.ietf.org/html/rfc4960#section-5.2.3
473473 // If an INIT ACK is received by an endpoint in any state other than the
474474 // COOKIE - WAIT state, the endpoint should discard the INIT ACK chunk.
475475 break ;
476476
477- case var ct when ct == SctpChunkType . INIT_ACK && State == SctpAssociationState . CookieWait :
477+ case var _ when chunkType == SctpChunkType . INIT_ACK && State == SctpAssociationState . CookieWait :
478478
479479 if ( _t1Init != null )
480480 {
@@ -528,23 +528,23 @@ internal void OnPacketReceived(SctpPacket packet)
528528 }
529529 break ;
530530
531- case var ct when ct == SctpChunkType . INIT_ACK && State != SctpAssociationState . CookieWait :
531+ case var _ when chunkType == SctpChunkType . INIT_ACK && State != SctpAssociationState . CookieWait :
532532 logger . LogWarning ( "SCTP association received INIT_ACK chunk in wrong state of {State}, ignoring." , State ) ;
533533 break ;
534534
535535 case SctpChunkType . SACK :
536536 _dataSender . GotSack ( chunk as SctpSackChunk ) ;
537537 break ;
538538
539- case var ct when ct == SctpChunkType . SHUTDOWN && State == SctpAssociationState . Established :
539+ case var _ when chunkType == SctpChunkType . SHUTDOWN && State == SctpAssociationState . Established :
540540 // TODO: Check outstanding data chunks.
541541 _dataSender ? . Close ( ) ;
542542 var shutdownAck = new SctpChunk ( SctpChunkType . SHUTDOWN_ACK ) ;
543543 SendChunk ( shutdownAck ) ;
544544 SetState ( SctpAssociationState . ShutdownAckSent ) ;
545545 break ;
546546
547- case var ct when ct == SctpChunkType . SHUTDOWN_ACK && State == SctpAssociationState . ShutdownSent :
547+ case var _ when chunkType == SctpChunkType . SHUTDOWN_ACK && State == SctpAssociationState . ShutdownSent :
548548 SetState ( SctpAssociationState . Closed ) ;
549549 var shutCompleteChunk = new SctpChunk ( SctpChunkType . SHUTDOWN_COMPLETE ,
550550 ( byte ) ( _remoteVerificationTag != 0 ? SHUTDOWN_CHUNK_TBIT_FLAG : 0x00 ) ) ;
0 commit comments