Skip to content

Commit

Permalink
Stop streaming on network errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAdam committed Jul 11, 2014
1 parent 4574bfc commit 92655c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package streamingtwitter

import (
"encoding/json"
"net"
"net/url"
)

Expand Down Expand Up @@ -76,6 +77,9 @@ func (s *StreamClient) Stream(stream *TwitterAPIURL, formValues *url.Values) {
if err.Error() == "EOF" {
return
}
if _, ok := err.(*net.OpError); ok {
return
}
continue
}

Expand Down

0 comments on commit 92655c2

Please sign in to comment.