Skip to content

Commit

Permalink
feat: v0.4.1 (#34)
Browse files Browse the repository at this point in the history
* feat: socket moved to its own GenServer

* feat: frame validation GOAWAY errors WIP

New Connection.Processor module to validate frames, acting on them if
valid.

Also: Ping now has :stream_id

* feat: set max initial window size and max frame size

Also, various refactorings.

* fix: dont accidentally send 0-size WINDOW_UPDATE

It's a PROTOCOL_ERROR

* fix: respect remote flow control window

WINDOW_UPDATES were blowing past the max limit for servers that enforce
it (APNS).

Also: Connection.FlowControl can now queue a list of requests, and
process them recursively.

* refactor: cleanup to increase test coverage

* fix: process GOAWAY immediately (and send one back)

Proper thing to do on recv of GOAWAY.

* fix: dont auto-stop Kadabra.Connection

On recv of GOAWAY, error, etc, wait for Supervisor to stop it by
spawning a task.

Might present issues on received stream frames that get processed before
the kill. Will need to implement some sort of graceful shutdown.

* refactor: remove StreamSupervisor

Makes more sense to just link streams to Connection and remove them from
flow control as they stop. Will be useful for detecting crashed streams
and handling accordingly.

* refactor: remove registry tuples for Stream

No longer needed!

* refactor: removed Stream.FlowControl dependencies

It now acts more like a data chunker that respects a given
configuration. Stream is now responsible for popping off the :out_queue
and sending the appropriate DATA frames.

* fix: differentiate local and remote settings

* refactor: reduce Stream dependencies

* refactor: HEADERS frame implements Encodable

* refactor: remove various module dependencies

* refactor: remove Socket depdency on Frame

* refactor: StreamSet

Currently held within Connection.FlowControl-- needs to be broken out.
Will allow Stream.FlowControl and Connection.FlowControl to become
effectively the same when refactored properly.

* fix: send WINDOW_UPDATE on stream even with full conn

* test: increase test coverage

* chore: prepare for v0.4.1 release
  • Loading branch information
hpopp authored May 10, 2018
1 parent 375c25d commit ac9a3a2
Show file tree
Hide file tree
Showing 29 changed files with 1,051 additions and 824 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v0.4.1
- Send exactly number of allowed bytes on initial connection WINDOW_UPDATE
- Default settings use maximum values for MAX_FRAME_SIZE and INITIAL_WINDOW_SIZE
- Incoming PING and WINDOW_UPDATE frames are now validated, closing the
connection if an error is encountered
- Fixed: can no longer accidentally send 0-size WINDOW_UPDATE frames
- Fixed: don't send WINDOW_UPDATE frames larger than remote server's available
connection flow window

## v0.4.0
- Support for `http` URIs
- Requests are now buffered with GenStage
Expand Down
16 changes: 0 additions & 16 deletions config/dogma.exs

This file was deleted.

1 change: 1 addition & 0 deletions lib/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ defmodule Kadabra.Config do
ref: nil,
uri: nil,
socket: nil,
queue: nil,
opts: []

@type t :: %__MODULE__{
Expand Down
Loading

0 comments on commit ac9a3a2

Please sign in to comment.