Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(socket) - add handle_info :ssl_error #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
elixir 1.11.3
erlang 25.3.2.5
elixir 1.14.5-otp-25
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.6.1

- Added handle_info for :ssl_error

## v0.6.0

**Security**
Expand Down
2 changes: 1 addition & 1 deletion lib/frame/continuation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Kadabra.Frame.Continuation do

defstruct [:header_block_fragment, :stream_id, end_headers: false]

use Bitwise
import Bitwise

@type t :: %__MODULE__{
end_headers: boolean,
Expand Down
2 changes: 1 addition & 1 deletion lib/frame/data.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Kadabra.Frame.Data do

defstruct [:stream_id, :data, end_stream: false]

use Bitwise
import Bitwise

alias Kadabra.Frame

Expand Down
2 changes: 1 addition & 1 deletion lib/frame/headers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule Kadabra.Frame.Headers do
weight: non_neg_integer
}

use Bitwise
import Bitwise

alias Kadabra.Frame

Expand Down
2 changes: 1 addition & 1 deletion lib/frame/ping.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Kadabra.Frame.Ping do

defstruct [:data, stream_id: 0, ack: false]

use Bitwise
import Bitwise

alias Kadabra.Frame

Expand Down
2 changes: 1 addition & 1 deletion lib/frame/push_promise.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Kadabra.Frame.PushPromise do
header_block_fragment: nil,
stream_id: nil

use Bitwise
import Bitwise

alias Kadabra.Frame

Expand Down
2 changes: 1 addition & 1 deletion lib/frame/settings.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Kadabra.Frame.Settings do

defstruct [:settings, ack: false]

use Bitwise
import Bitwise

alias Kadabra.Connection

Expand Down
5 changes: 5 additions & 0 deletions lib/socket.ex
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,9 @@ defmodule Kadabra.Socket do
Kernel.send(state.active_user, {:closed, self()})
{:noreply, %{state | socket: nil}}
end

def handle_info({:ssl_error, _socket, _reason}, state) do
Kernel.send(state.active_user, {:closed, self()})
{:noreply, %{state | socket: nil}}
end
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Kadabra.Mixfile do
use Mix.Project

@version "0.6.0"
@version "0.6.1"

def project do
[
Expand Down