Skip to content

Commit

Permalink
Remove the unused args from connection.Close
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur22 committed Oct 7, 2024
1 parent 143a8a5 commit 2df3e76
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions common/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type executorEmitter interface {

type connection interface {
executorEmitter
Close(...int)
Close()
IgnoreIOErrors()
getSession(target.SessionID) *Session
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 2df3e76

Please sign in to comment.