From 703ee8a3ea53811bd5ab11af96eb261e7bbf5e5f Mon Sep 17 00:00:00 2001 From: Justin Baker Date: Fri, 31 Aug 2018 15:13:05 -0500 Subject: [PATCH] Add bare `:ping` and `:pong` frames to the spec --- CHANGELOG.md | 2 ++ lib/websockex.ex | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a8a7e5..5be9f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## In Git ### Bug Fixes - Fix `pong` frame not being a correct return type in spec +- Fix bare `ping` and `pong` frames in spec + - When neither grame doesn't have a payload ## 0.4.1 ### Enhancements diff --git a/lib/websockex.ex b/lib/websockex.ex index 04b7127..25fc78a 100644 --- a/lib/websockex.ex +++ b/lib/websockex.ex @@ -48,8 +48,9 @@ defmodule WebSockex do @type client :: pid | :atom | {:via, module, atom} @type frame :: - {:ping | :ping, nil | message :: binary} - | {:pong | :pong, nil | message :: binary} + :ping + | :pong + | {:ping | :pong, nil | message :: binary} | {:text | :binary, message :: binary} @typedoc """