@@ -171,7 +171,7 @@ defmodule DBConnection do
171
171
to allow the checkout or `{:disconnect, exception, state}` to disconnect.
172
172
173
173
This callback is called immediately after the connection is established
174
- and the state is never effetively checked in again. That's because
174
+ and the state is never effectively checked in again. That's because
175
175
DBConnection keeps the connection state in an ETS table that is moved
176
176
between the different clients checking out connections. There is no
177
177
`checkin` callback. The state is only handed back to the connection
@@ -1274,13 +1274,13 @@ defmodule DBConnection do
1274
1274
end
1275
1275
1276
1276
@ doc """
1277
- Returns connection module used by the given connection pool.
1277
+ Returns the connection module used by the given connection pool.
1278
1278
1279
1279
When given a process that is not a connection pool, returns an `:error`.
1280
1280
"""
1281
1281
@ spec connection_module ( conn ) :: { :ok , module } | :error
1282
1282
def connection_module ( conn ) do
1283
- with pid when pid != nil <- pool_pid ( conn ) ,
1283
+ with pid when is_pid ( pid ) <- pool_pid ( conn ) ,
1284
1284
{ :dictionary , dictionary } <- Process . info ( pid , :dictionary ) ,
1285
1285
{ @ connection_module_key , module } <- List . keyfind ( dictionary , @ connection_module_key , 0 ) ,
1286
1286
do: { :ok , module } ,
0 commit comments