diff --git a/cmd/stindex/dumpsize.go b/cmd/stindex/dumpsize.go index 442308219..e6b5adb6f 100644 --- a/cmd/stindex/dumpsize.go +++ b/cmd/stindex/dumpsize.go @@ -15,7 +15,6 @@ import ( "github.com/syndtr/goleveldb/leveldb" ) -// An IntHeap is a min-heap of ints. type SizedElement struct { key string size int diff --git a/cmd/syncthing/gui.go b/cmd/syncthing/gui.go index a7df38597..1ea2cbc2f 100644 --- a/cmd/syncthing/gui.go +++ b/cmd/syncthing/gui.go @@ -199,7 +199,10 @@ func (s *apiService) getListener(guiCfg config.GUIConfiguration) (net.Listener, return nil, err } - listener := &tlsutil.DowngradingListener{rawListener, tlsCfg} + listener := &tlsutil.DowngradingListener{ + Listener: rawListener, + TLSConfig: tlsCfg, + } return listener, nil } diff --git a/lib/connections/connections.go b/lib/connections/connections.go index 8452f5b6e..c88ad0f4a 100644 --- a/lib/connections/connections.go +++ b/lib/connections/connections.go @@ -268,9 +268,9 @@ next: s.mut.Lock() s.model.AddConnection(model.Connection{ - c, - protoConn, - c.Type, + Conn: c, + Connection: protoConn, + Type: c.Type, }, hello) s.connType[remoteID] = c.Type s.mut.Unlock() @@ -319,7 +319,8 @@ func (s *Service) connect() { s.model.Close(deviceID, fmt.Errorf("switching connections")) } s.conns <- model.IntermediateConnection{ - conn, model.ConnectionTypeDirectDial, + Conn: conn, + Type: model.ConnectionTypeDirectDial, } continue nextDevice } @@ -350,7 +351,8 @@ func (s *Service) connect() { if conn := s.connectViaRelay(deviceID, addr); conn != nil { l.Debugln("Connecting to", deviceID, "via", addr, "succeeded") s.conns <- model.IntermediateConnection{ - conn, model.ConnectionTypeRelayDial, + Conn: conn, + Type: model.ConnectionTypeRelayDial, } continue nextDevice } diff --git a/lib/connections/connections_tcp.go b/lib/connections/connections_tcp.go index 33e4c5229..35b23ae85 100644 --- a/lib/connections/connections_tcp.go +++ b/lib/connections/connections_tcp.go @@ -91,7 +91,8 @@ func makeTCPListener(network string) ListenerFactory { } conns <- model.IntermediateConnection{ - tc, model.ConnectionTypeDirectAccept, + Conn: tc, + Type: model.ConnectionTypeDirectAccept, } } }