Skip to content

Commit

Permalink
Elixir 1.14 compatibility + Resolve some deprecation warnings (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
chen-anders authored Nov 30, 2023
1 parent 0d9f24c commit 14c3a4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config
import Config

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
Expand Down
4 changes: 2 additions & 2 deletions lib/nsq/connection/initializer.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule NSQ.Connection.Initializer do

@project ElixirNsq.Mixfile.project
@user_agent "#{@project[:app]}/#{@project[:version]}"
@ssl_versions [:sslv3, :tlsv1, :"tlsv1.1", :"tlsv1.2"] |> Enum.with_index
@ssl_versions [:tlsv1, :"tlsv1.1", :"tlsv1.2"] |> Enum.with_index


@spec connect(%{nsqd: C.host_with_port}) :: {:ok, C.state} | {:error, String.t}
Expand Down Expand Up @@ -115,7 +115,7 @@ defmodule NSQ.Connection.Initializer do
def inflate(data) do
z = :zlib.open
:ok = z |> :zlib.inflateInit(-15)
inflated = z |> :zlib.inflateChunk(data)
inflated = z |> :zlib.safeInflate(data)
Logger.warn "inflated chunk?"
Logger.warn inspect inflated
:ok = z |> :zlib.inflateEnd
Expand Down

0 comments on commit 14c3a4e

Please sign in to comment.