Explorar el Código

return error while expires equal to zero

hangzws hace 6 años
padre
commit
e6af3f4aa3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      oss/livechannel.go

+ 1 - 1
oss/livechannel.go

@@ -248,7 +248,7 @@ func (bucket Bucket) DeleteLiveChannel(channelName string) error {
 // error        nil if success, otherwise error
 //
 func (bucket Bucket) SignRtmpURL(channelName, playlistName string, expires int64) (string, error) {
-	if expires < 0 {
+	if expires <= 0 {
 		return "", fmt.Errorf("invalid argument: %d, expires must greater than 0", expires)
 	}
 	expiration := time.Now().Unix() + expires