enhanced the reconnect logic in client.go

This commit is contained in:
2025-02-19 10:38:23 +09:00
parent 2b3a841299
commit b5c1ae2a73
4 changed files with 34 additions and 24 deletions

View File

@ -69,7 +69,7 @@ func (spc *ServerPeerConn) RunTask(wg *sync.WaitGroup) {
// set up a timer to set waiting duration until the connection is
// actually established on the client side and it's informed...
waitctx, cancel_wait = context.WithTimeout(spc.route.Cts.S.ctx, 5 * time.Second) // TODO: make this configurable
waitctx, cancel_wait = context.WithTimeout(spc.route.Cts.S.Ctx, 5 * time.Second) // TODO: make this configurable
wait_for_started:
for {
select {