Current section

9 Versions

Jump to

Compare versions

4 files changed
+19 additions
-10 deletions
  @@ -1,11 +1,17 @@
1 1 # Changelog for ConnGRPC
2 2
3 3
4 + ## v0.3.1
5 +
6 + ### Fix
7 +
8 + - Handle disconnect when channel is not initialized, by @yordis (closes https://github.com/TheRealReal/conn_grpc/issues/22)
9 +
4 10 ## v0.3.0
5 11
6 12 ### Added
7 13
8 - - `otp_app` option on `ConnGRPC.Pool`
14 + - `otp_app` option on `ConnGRPC.Pool`, by @yordis
9 15
10 16 ## v0.2.1
  @@ -1,6 +1,6 @@
1 1 {<<"links">>,[{<<"GitHub">>,<<"https://github.com/TheRealReal/conn_grpc">>}]}.
2 2 {<<"name">>,<<"conn_grpc">>}.
3 - {<<"version">>,<<"0.3.0">>}.
3 + {<<"version">>,<<"0.3.1">>}.
4 4 {<<"description">>,
5 5 <<"Persistent channels, and channel pools for gRPC Elixir">>}.
6 6 {<<"elixir">>,<<"~> 1.12">>}.
  @@ -253,14 +253,17 @@ defmodule ConnGRPC.Channel do
253 253 defp handle_disconnect(state) do
254 254 now = System.monotonic_time()
255 255 debug(state, "Connection down")
256 - state.on_disconnect.()
257 - state.channel.adapter.disconnect(state.channel)
258 256
259 - :telemetry.execute(
260 - [:conn_grpc, :channel, :disconnected],
261 - %{duration: now - state.connection_start},
262 - telemetry_metadata(state)
263 - )
257 + if state.channel do
258 + state.on_disconnect.()
259 + state.channel.adapter.disconnect(state.channel)
260 +
261 + :telemetry.execute(
262 + [:conn_grpc, :channel, :disconnected],
263 + %{duration: now - state.connection_start},
264 + telemetry_metadata(state)
265 + )
266 + end
264 267
265 268 state = %{state | channel: nil}
266 269 schedule_retry(state)
  @@ -2,7 +2,7 @@ defmodule ConnGRPC.MixProject do
2 2 use Mix.Project
3 3
4 4 @source_url "https://github.com/TheRealReal/conn_grpc"
5 - @version "0.3.0"
5 + @version "0.3.1"
6 6
7 7 def project do
8 8 [