Skip to content

Commit

Permalink
chore: fix multiple typos in comments (#3612)
Browse files Browse the repository at this point in the history
* chore: fix multiple typos I run into

* Update conn_id_generator_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

* Update internal/ackhandler/sent_packet_handler_test.go

Co-authored-by: Marten Seemann <martenseemann@gmail.com>

Co-authored-by: Marten Seemann <martenseemann@gmail.com>
  • Loading branch information
tobyxdd and marten-seemann committed Nov 6, 2022
1 parent df762b7 commit 5fe9f9b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion conn_id_generator_test.go
Expand Up @@ -75,7 +75,7 @@ var _ = Describe("Connection ID Generator", func() {
Expect(queuedFrames).To(HaveLen(protocol.MaxIssuedConnectionIDs - 1))
})

// SetMaxActiveConnIDs is called twice when we dialing a 0-RTT connection:
// SetMaxActiveConnIDs is called twice when dialing a 0-RTT connection:
// once for the restored from the old connections, once when we receive the transport parameters
Context("dealing with 0-RTT", func() {
It("doesn't issue new connection IDs when SetMaxActiveConnIDs is called with the same value", func() {
Expand Down
2 changes: 1 addition & 1 deletion connection.go
Expand Up @@ -1217,7 +1217,7 @@ func (s *connection) handleUnpackedPacket(
// We create the connection as soon as we receive the first packet from the client.
// We do that before authenticating the packet.
// That means that if the source connection ID was corrupted,
// we might have create a connection with an incorrect source connection ID.
// we might have created a connection with an incorrect source connection ID.
// Once we authenticate the first packet, we need to update it.
if s.perspective == protocol.PerspectiveServer {
if packet.hdr.SrcConnectionID != s.handshakeDestConnID {
Expand Down
2 changes: 1 addition & 1 deletion internal/ackhandler/sent_packet_handler_test.go
Expand Up @@ -190,7 +190,7 @@ var _ = Describe("SentPacketHandler", func() {
Expect(err).ToNot(HaveOccurred())
Expect(handler.appDataPackets.largestAcked).To(Equal(protocol.PacketNumber(3)))
// this wouldn't happen in practice
// for testing purposes, we pretend send a different ACK frame in a duplicated packet, to be able to verify that it actually doesn't get processed
// for testing purposes, we pretend to send a different ACK frame in a duplicated packet, to be able to verify that it actually doesn't get processed
_, err = handler.ReceivedAck(ack2, protocol.Encryption1RTT, time.Now())
Expect(err).ToNot(HaveOccurred())
Expect(handler.appDataPackets.largestAcked).To(Equal(protocol.PacketNumber(4)))
Expand Down
2 changes: 1 addition & 1 deletion internal/flowcontrol/base_flow_controller.go
Expand Up @@ -47,7 +47,7 @@ func (c *baseFlowController) AddBytesSent(n protocol.ByteCount) {
c.bytesSent += n
}

// UpdateSendWindow is be called after receiving a MAX_{STREAM_}DATA frame.
// UpdateSendWindow is called after receiving a MAX_{STREAM_}DATA frame.
func (c *baseFlowController) UpdateSendWindow(offset protocol.ByteCount) {
if offset > c.sendWindow {
c.sendWindow = offset
Expand Down
2 changes: 1 addition & 1 deletion send_stream.go
Expand Up @@ -122,7 +122,7 @@ func (s *sendStream) Write(p []byte) (int, error) {
var copied bool
var deadline time.Time
// As soon as dataForWriting becomes smaller than a certain size x, we copy all the data to a STREAM frame (s.nextFrame),
// which can the be popped the next time we assemble a packet.
// which can then be popped the next time we assemble a packet.
// This allows us to return Write() when all data but x bytes have been sent out.
// When the user now calls Close(), this is much more likely to happen before we popped that last STREAM frame,
// allowing us to set the FIN bit on that frame (instead of sending an empty STREAM frame with FIN).
Expand Down

0 comments on commit 5fe9f9b

Please sign in to comment.