From 7943bd68c5489e81e7c220160b2083f4fb30a300 Mon Sep 17 00:00:00 2001 From: Rafael Vanoni Date: Thu, 15 Dec 2022 23:16:37 -0800 Subject: [PATCH] Fix typo in Events section of the readme file (#63) * Fix typo in Events section of the readme file --- README.md | 2 +- subscription.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9580bf4..61bb21c 100644 --- a/README.md +++ b/README.md @@ -561,7 +561,7 @@ client.OnConnected(fn func()) // OnDisconnected event is triggered when the websocket client was disconnected client.OnDisconnected(fn func()) -// OnConnected event is triggered when there is any connection error. This is bottom exception handler level +// OnError event is triggered when there is any connection error. This is bottom exception handler level // If this function is empty, or returns nil, the error is ignored // If returns error, the websocket connection will be terminated client.OnError(onError func(sc *SubscriptionClient, err error) error) diff --git a/subscription.go b/subscription.go index 67350dd..994c1bd 100644 --- a/subscription.go +++ b/subscription.go @@ -188,7 +188,7 @@ func (sc *SubscriptionClient) WithReadLimit(limit int64) *SubscriptionClient { return sc } -// OnConnected event is triggered when there is any connection error. This is bottom exception handler level +// OnError event is triggered when there is any connection error. This is bottom exception handler level // If this function is empty, or returns nil, the error is ignored // If returns error, the websocket connection will be terminated func (sc *SubscriptionClient) OnError(onError func(sc *SubscriptionClient, err error) error) *SubscriptionClient {