Skip to content

Commit

Permalink
update fix stream bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MacOMNI committed Dec 11, 2024
1 parent ccaedb9 commit e0e9663
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Networking/Sources/MsQuicSwift/QuicConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ private class ConnectionHandle {
case QUIC_CONNECTION_EVENT_PEER_STREAM_STARTED:
logger.debug("Peer stream started")
let streamPtr = event.pointee.PEER_STREAM_STARTED.Stream
if let connection {
let stream = QuicStream(connection: connection, stream: streamPtr!, handler: connection.handler)
if let connection, let streamPtr, connection.api != nil {
let stream = QuicStream(connection: connection, stream: streamPtr, handler: connection.handler)
connection.handler.streamStarted(connection, stream: stream)
} else {
logger.warning("Stream started but connection is gone?")
Expand Down

0 comments on commit e0e9663

Please sign in to comment.