Commit 0f01a355 authored by foxyriver's avatar foxyriver

stop the Timer

parent 16670f1a
......@@ -430,7 +430,7 @@ func (c *sioClient) WaitForAttachedDevice(token string) (string, error) {
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
timer := time.NewTimer(30 * time.Second)
defer ticker.Stop()
defer timer.Stop()
for {
select {
......@@ -464,7 +464,7 @@ func (c *sioClient) WaitForDetachedDevice(token string) error {
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
timer := time.NewTimer(30 * time.Second)
defer ticker.Stop()
defer timer.Stop()
for {
select {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment