Skip to content

Commit 01eea67

Browse files
committed
fix: update cancel_timer helper to info:false always
We don't use the return
1 parent bfe1807 commit 01eea67

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/realtime/helpers.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ defmodule Realtime.Helpers do
22
@moduledoc """
33
This module includes helper functions for different contexts that can't be union in one module.
44
"""
5-
@spec cancel_timer(reference() | nil) :: non_neg_integer() | false | :ok | nil
6-
def cancel_timer(nil), do: nil
7-
def cancel_timer(ref), do: Process.cancel_timer(ref)
5+
@spec cancel_timer(reference() | nil) :: :ok
6+
def cancel_timer(ref) when is_reference(ref), do: Process.cancel_timer(ref, info: false)
7+
def cancel_timer(_), do: :ok
88

99
@doc """
1010
Takes the first N items from the queue and returns the list of items and the new queue.

0 commit comments

Comments
 (0)