fix: early exit on Accept() error
This commit is contained in:
parent
c4ed26526e
commit
424e985c2b
|
@ -42,6 +42,8 @@ func (s *Server) handleNewConn(ctx context.Context, conn *kcp.UDPSession) {
|
||||||
|
|
||||||
if err := remoteClient.Accept(ctx, conn); err != nil {
|
if err := remoteClient.Accept(ctx, conn); err != nil {
|
||||||
logger.Error(ctx, "remote client error", logger.E(err))
|
logger.Error(ctx, "remote client error", logger.E(err))
|
||||||
|
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := remoteClient.Listen(ctx); err != nil {
|
if err := remoteClient.Listen(ctx); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue