@@ -111,9 +111,9 @@ func (s *SSServer) loadConfig(filename string) error {
111
111
return fmt .Errorf ("failed to load config (%v): %w" , filename , err )
112
112
}
113
113
114
- // We hot swap the services by having them both live at the same time. This
115
- // means we create services for the new config first, and then take down the
116
- // services from the old config .
114
+ // We hot swap the config by having the old and new listeners both live at
115
+ // the same time. This means we create listeners for the new config first,
116
+ // and then close the old ones after .
117
117
oldListenerSet := s .lnSet
118
118
s .lnSet = s .lnManager .NewListenerSet ()
119
119
var totalCipherCount int
@@ -152,7 +152,7 @@ func (s *SSServer) loadConfig(filename string) error {
152
152
logger .Infof ("Loaded %d access keys over %d listeners" , totalCipherCount , s .lnSet .Len ())
153
153
s .m .SetNumAccessKeys (totalCipherCount , s .lnSet .Len ())
154
154
155
- // Take down the old services now that the new ones are created and serving.
155
+ // Take down the old listeners now that the new ones are created and serving.
156
156
if oldListenerSet != nil {
157
157
if err := oldListenerSet .Close (); err != nil {
158
158
logger .Errorf ("Failed to stop old listeners: %w" , err )
@@ -163,7 +163,7 @@ func (s *SSServer) loadConfig(filename string) error {
163
163
return nil
164
164
}
165
165
166
- // Stop serving on all existing services .
166
+ // Stop serving on all existing listeners .
167
167
func (s * SSServer ) Stop () error {
168
168
if s .lnSet == nil {
169
169
return nil
0 commit comments