Skip to content

Commit

Permalink
Release: v1.0.24-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-the-h committed Oct 15, 2021
1 parent e72850e commit 96a59f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ Changelog
=========
All notable changes to this project will be documented in this file.

v1.0.24-alpha
------------

### Changed

- Fixed nil assignment issue on login process

v1.0.23-alpha
------------

Expand Down
7 changes: 6 additions & 1 deletion api/ws/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,14 @@ func (c *ClientWs) Connect(p bool) error {
//
// https://www.okex.com/docs-v5/en/#websocket-api-login
func (c *ClientWs) Login() error {
if c.AuthRequested != nil || time.Since(*c.AuthRequested) < PingPeriod {
if c.Authorized {
return nil
}
if c.AuthRequested != nil && time.Since(*c.AuthRequested) < 30 {
return nil
}
now := time.Now()
c.AuthRequested = &now
method := http.MethodGet
path := "/users/self/verify"
ts, sign := c.sign(method, path)
Expand Down

0 comments on commit 96a59f7

Please sign in to comment.