소스 검색

return error while expires equal to zero

hangzws 6 년 전
부모
커밋
e6af3f4aa3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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