mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-11-11 11:31:32 +00:00
Only close connection if it is not nil
This commit is contained in:
parent
123093a186
commit
d0ee899ab9
1 changed files with 5 additions and 1 deletions
|
@ -84,7 +84,11 @@ defmodule Pleroma.LDAP do
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def terminate(_, state) do
|
def terminate(_, state) do
|
||||||
:eldap.close(state[:connection])
|
connection = Keyword.get(state, :connection)
|
||||||
|
|
||||||
|
if not is_nil(connection) do
|
||||||
|
:eldap.close(connection)
|
||||||
|
end
|
||||||
|
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue