File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,10 +175,14 @@ func (s *sshUdpServer) activateServer() error {
175175 // from exiting unexpectedly while the old client is still connected.
176176 oldServer .closeActiveStreams ()
177177
178- debug ("new client [%x] notifying old client [%x] to quit" , s .client .proxyAddr .clientID , oldServer .client .proxyAddr .clientID )
179- _ = oldServer .sendBusMessage ("quit" , quitMessage {fmt .Sprintf ("another client attached from %s" , s .client .remoteAddr ())})
180- time .Sleep (time .Second ) // give udp some time
181- oldServer .Close ()
178+ if oldServer .clientChecker .isTimeout () {
179+ oldServer .Close ()
180+ } else {
181+ debug ("new client [%x] notifying old client [%x] to quit" , s .client .proxyAddr .clientID , oldServer .client .proxyAddr .clientID )
182+ _ = oldServer .sendBusMessage ("quit" , quitMessage {fmt .Sprintf ("another client attached from %s" , s .client .remoteAddr ())})
183+ time .Sleep (time .Second ) // give udp some time
184+ oldServer .Close ()
185+ }
182186 }()
183187 }
184188
You can’t perform that action at this time.
0 commit comments