From 6d3fb2c948cc0b56bbca6b148d9101aa0d10e6e0 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Mon, 7 Oct 2024 15:47:10 +0100 Subject: [PATCH] Remove the unused args from connection.Close --- common/connection.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/connection.go b/common/connection.go index 2b4122a97..b28c6e4ba 100644 --- a/common/connection.go +++ b/common/connection.go @@ -50,7 +50,7 @@ type executorEmitter interface { type connection interface { executorEmitter - Close(...int) + Close() IgnoreIOErrors() getSession(target.SessionID) *Session } @@ -567,11 +567,8 @@ func (c *Connection) sendLoop() { // It returns an error if sending the Close control frame fails. // // Optional code to override default websocket.CloseGoingAway (1001). -func (c *Connection) Close(args ...int) { +func (c *Connection) Close() { code := websocket.CloseNormalClosure - if len(args) > 0 { - code = int(args[0]) - } c.logger.Debugf("connection:Close", "wsURL:%q code:%d", c.wsURL, code) _ = c.close(code) }