Skip to content

Commit

Permalink
add delay on close connection
Browse files Browse the repository at this point in the history
  • Loading branch information
kubemq committed May 27, 2021
1 parent 15318be commit 7727513
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions queues_stream/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package queues_stream
import (
"context"
"fmt"
"time"

"github.com/kubemq-io/kubemq-go/pkg/uuid"
pb "github.com/kubemq-io/protobuf/go"
Expand Down Expand Up @@ -80,6 +81,7 @@ func (q *QueuesStreamClient) AckAll(ctx context.Context, request *AckAllRequest)
}

func (q *QueuesStreamClient) Close() error {
time.Sleep(100 *time.Millisecond)
q.upstream.close()
q.downstream.close()
return q.client.Close()
Expand Down

0 comments on commit 7727513

Please sign in to comment.