Skip to content

Commit

Permalink
Fix leastTimeout nano-ms conversion (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
leszko committed Mar 29, 2024
1 parent cfa43b3 commit babe9f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -910,13 +910,13 @@ func (lapi *Client) Heartbeat(id string) error {
}

// LockPull locks the stream pull
func (lapi *Client) LockPull(id string, leaseTimeoutMs time.Duration, host string) error {
func (lapi *Client) LockPull(id string, leaseTimeout time.Duration, host string) error {
if id == "" {
return errors.New("empty id")
}

payload := map[string]interface{}{
"leaseTimeout": leaseTimeoutMs,
"leaseTimeout": leaseTimeout.Milliseconds(),
"host": host,
}
u := fmt.Sprintf("%s/api/stream/%s/lockPull", lapi.chosenServer, id)
Expand Down

0 comments on commit babe9f0

Please sign in to comment.