Skip to content

Commit

Permalink
Change Bintray stream API default log level
Browse files Browse the repository at this point in the history
  • Loading branch information
TamirHadad committed May 14, 2017
1 parent f59181f commit 7fd4f08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions bintray/commands/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ func Stream(streamDetails *StreamDetails, writer io.Writer) (err error) {
}
}()

for (err == nil) {
if (!connected) {
for err == nil {
if !connected {
time.Sleep(TIMEOUT_DURATION)
continue
}
if (time.Since(lastServerInteraction) < TIMEOUT_DURATION) {
if time.Since(lastServerInteraction) < TIMEOUT_DURATION {
time.Sleep(TIMEOUT_DURATION - time.Now().Sub(lastServerInteraction))
continue
}
Expand Down
4 changes: 2 additions & 2 deletions bintray/helpers/streammanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (sm *StreamManager) Connect() (bool, *http.Response) {
if sm.isReconnection() {
sm.setReconnectHeader()
}
log.Info("Connecting...")
log.Debug("Connecting...")
resp, _, _, e := httputils.Stream(sm.Url, sm.HttpClientDetails)
if e != nil {
return false, resp
Expand All @@ -100,6 +100,6 @@ func (sm *StreamManager) Connect() (bool, *http.Response) {

}
sm.ReconnectId = resp.Header.Get(BINTRAY_RECONNECT_HEADER)
log.Info("Connected.")
log.Debug("Connected.")
return true, resp
}

0 comments on commit 7fd4f08

Please sign in to comment.