-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
h2_client:send_request/3 does not check the return from h2_connection:new_stream/1,2. When a new stream cannot be created, for example, because the peer connection sets the maximum concurrent streams to 1, h2_connection:new_stream/1,2 returns {error, 7}. However, because h2_client:send_request/3 does not check this, it returns {ok, {error, 7}} to the caller, which blows up when it next tries to use a stream id of {error, 7}. This commit corrects this so that h2_client:send_request/3 returns either {ok, stream_id()} or {error, error_code()}. This commit also refactors sync_request/3 to call send_request/3, and adds or corrects some type specs (such as the one for h2_connection:new_stream/1).
- Loading branch information
Edwin Fine
committed
Jan 19, 2017
1 parent
adb3474
commit 15250e8
Showing
3 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ _build | |
rebar3 | ||
.rebar3 | ||
log | ||
.*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters