@@ -115,7 +115,8 @@ defmodule ConnGRPC.Pool do
115115 defmacro __using__ ( use_opts \\ [ ] ) do
116116 quote do
117117 @ doc "Returns a gRPC channel from the pool"
118- @ spec get_channel ( ) :: { :ok , GRPC.Channel . t ( ) } | { :error , :not_connected }
118+ @ spec get_channel ( ) ::
119+ { :ok , GRPC.Channel . t ( ) } | { :error , :not_connected } | { :error , :not_started }
119120 def get_channel , do: ConnGRPC.Pool . get_channel ( __MODULE__ )
120121
121122 @ doc "Returns a gRPC channel from the pool, raising on error"
@@ -163,11 +164,11 @@ defmodule ConnGRPC.Pool do
163164 end
164165
165166 @ doc "Returns a gRPC channel from the pool"
166- @ spec get_channel ( module | atom ) :: { :ok , GRPC.Channel . t ( ) } | { :error , :not_connected }
167+ @ spec get_channel ( module | atom ) ::
168+ { :ok , GRPC.Channel . t ( ) } | { :error , :not_connected } | { :error , :not_started }
167169 def get_channel ( pool_name ) do
168- start = System . monotonic_time ( )
169-
170170 if registry_alive? ( pool_name ) do
171+ start = System . monotonic_time ( )
171172 channels = Registry . lookup ( registry ( pool_name ) , :channels )
172173 pool_size = length ( channels )
173174
0 commit comments