Skip to content

Commit

Permalink
Remove unused initialisation code
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneHowearth committed Sep 23, 2019
1 parent 99a0fdf commit 9d6fabe
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion client/lib/peers.go
Expand Up @@ -44,7 +44,7 @@ func (p *Peers) Collect() (Snowflake, error) {
cnt := p.Count()
s := fmt.Sprintf("Currently at [%d/%d]", cnt, p.capacity)
if cnt >= p.capacity {
s := fmt.Sprintf("At capacity [%d/%d]", cnt, p.capacity)
s = fmt.Sprintf("At capacity [%d/%d]", cnt, p.capacity)
return nil, errors.New(s)
}
log.Println("WebRTC: Collecting a new Snowflake.", s)
Expand Down
3 changes: 1 addition & 2 deletions client/lib/util.go
Expand Up @@ -60,9 +60,8 @@ func (b *BytesSyncLogger) Log() {
case amount = <-b.OutboundChan:
b.Outbound += amount
b.OutEvents++
last := time.Now()
last = time.Now()
if time.Since(last) > time.Second*LogTimeInterval {
last = time.Now()
output()
}
case amount = <-b.InboundChan:
Expand Down
2 changes: 1 addition & 1 deletion client/lib/webrtc.go
Expand Up @@ -298,7 +298,7 @@ func (c *WebRTCPeer) exchangeSDP() error {
}
// Keep trying the same offer until a valid answer arrives.
var ok bool
var answer *webrtc.SessionDescription = nil
var answer *webrtc.SessionDescription
for nil == answer {
go c.sendOfferToBroker()
answer, ok = <-c.answerChannel // Blocks...
Expand Down
4 changes: 2 additions & 2 deletions client/snowflake.go
Expand Up @@ -83,7 +83,7 @@ func main() {
// deadlock because the buffer is full.
// https://bugs.torproject.org/26360
// https://bugs.torproject.org/25600#comment:14
var logOutput io.Writer = ioutil.Discard
var logOutput = ioutil.Discard
if *logFilename != "" {
if *logToStateDir {
stateDir, err := pt.MakeStateDir()
Expand Down Expand Up @@ -169,7 +169,7 @@ func main() {
}
pt.CmethodsDone()

var numHandlers int = 0
var numHandlers int
var sig os.Signal
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGTERM)
Expand Down

0 comments on commit 9d6fabe

Please sign in to comment.