The original get_status/0 had a nested case/try that duplicated the "disconnected" status map across two branches. Split into: - status_from/1 with nil + is_pid heads for the "no GenServer" and "GenServer alive" paths. The alive path isolates the catch :exit, _ fallback for a non-responding process. - disconnected_status/1 builds the shared status map once, parameterised on the default server string to preserve the original branch-specific fallback behavior. Removes ~20 duplicated lines; all 61 Is tests still pass. |
||
|---|---|---|
| .. | ||
| is.ex | ||
| is_supervisor.ex | ||
| login_params.ex | ||
| packet_stats.ex | ||