This repository was archived by the owner on Oct 12, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ import (
2626 "context"
2727 "crypto/tls"
2828 "fmt"
29+ "runtime"
30+ "strings"
31+
2932 "github.com/Azure/azure-amqp-common-go/v3/aad"
3033 "github.com/Azure/azure-amqp-common-go/v3/auth"
3134 "github.com/Azure/azure-amqp-common-go/v3/cbs"
@@ -34,8 +37,6 @@ import (
3437 "github.com/Azure/go-amqp"
3538 "github.com/Azure/go-autorest/autorest/azure"
3639 "nhooyr.io/websocket"
37- "runtime"
38- "strings"
3940)
4041
4142const (
@@ -48,7 +49,7 @@ const (
4849 //`
4950
5051 // Version is the semantic version number
51- Version = "0.10.7 "
52+ Version = "0.10.9 "
5253
5354 rootUserAgent = "/golang-service-bus"
5455
Original file line number Diff line number Diff line change 44 "context"
55 "encoding/xml"
66 "errors"
7+ "fmt"
78 "io/ioutil"
89 "net/http"
910 "strings"
@@ -512,6 +513,10 @@ func SubscriptionWithLockDuration(window *time.Duration) SubscriptionManagementO
512513 duration := time .Duration (1 * time .Minute )
513514 window = & duration
514515 }
516+ if * window > time .Duration (5 * time .Minute ) {
517+ return fmt .Errorf ("Lock duration must be shorter than 5 minutes got: %v" , * window )
518+ }
519+
515520 s .LockDuration = ptrString (durationTo8601Seconds (* window ))
516521 return nil
517522 }
You can’t perform that action at this time.
0 commit comments