Remove close event on QuicConnection

This commit is contained in:
Mark Spanbroek 2020-12-21 14:37:20 +01:00 committed by markspanbroek
parent 15e3c4cf1c
commit a837f4f87d
3 changed files with 0 additions and 10 deletions

View File

@ -13,9 +13,6 @@ proc newClosedConnection*: ClosedConnection =
{.push locks: "unknown".}
method enter(state: ClosedConnection, connection: QuicConnection) =
connection.closed.fire()
method ids(state: ClosedConnection): seq[ConnectionId] =
@[]

View File

@ -9,7 +9,6 @@ type
outgoing*: AsyncQueue[Datagram]
incoming*: AsyncQueue[Stream]
handshake*: AsyncEvent
closed*: AsyncEvent
disconnect*: proc(): Future[void] {.gcsafe.}
ConnectionState* = ref object of RootObj
IdCallback* = proc(id: ConnectionId)
@ -55,7 +54,6 @@ proc newQuicConnection*(state: ConnectionState): QuicConnection =
outgoing: newAsyncQueue[Datagram](),
incoming: newAsyncQueue[Stream](),
handshake: newAsyncEvent(),
closed: newAsyncEvent()
)
state.enter(connection)
connection

View File

@ -70,11 +70,6 @@ suite "quic connection":
await server.handshake.wait()
check newId != ConnectionId.default
asynctest "fires event when closed":
let client = newQuicClientConnection(zeroAddress, zeroAddress)
await client.drop()
check client.closed.isSet()
asynctest "raises ConnectionError when closed":
let connection = newQuicClientConnection(zeroAddress, zeroAddress)
await connection.drop()