Skip to content

Commit

Permalink
Remove unused variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Oct 15, 2023
1 parent 8013cb9 commit 3e734cb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions network/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func Run(network, address string, server *Server) *gerr.GatewayDError {

go func(server *Server) {
<-server.engine.stopServer
server.OnShutdown(server.engine)
server.OnShutdown()
server.logger.Debug().Msg("Server stopped")
}(server)

Expand All @@ -116,7 +116,7 @@ func Run(network, address string, server *Server) *gerr.GatewayDError {
default:
interval, action := server.OnTick()
if action == Shutdown {
server.OnShutdown(server.engine)
server.OnShutdown()
return
}
if interval == time.Duration(0) {
Expand Down Expand Up @@ -150,7 +150,7 @@ func Run(network, address string, server *Server) *gerr.GatewayDError {
}
conn.Close()
if action == Shutdown {
server.OnShutdown(server.engine)
server.OnShutdown()
return nil
}
}
Expand Down
2 changes: 1 addition & 1 deletion network/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ func (s *Server) OnTraffic(conn net.Conn, stopConnection chan struct{}) Action {
}

// OnShutdown is called when the server is shutting down. It calls the OnShutdown hooks.
func (s *Server) OnShutdown(Engine) {
func (s *Server) OnShutdown() {
_, span := otel.Tracer("gatewayd").Start(s.ctx, "OnShutdown")
defer span.End()

Expand Down
2 changes: 1 addition & 1 deletion plugin/plugin_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"encoding/hex"
"sort"

semver "github.com/Masterminds/semver/v3"
"github.com/Masterminds/semver/v3"
sdkPlugin "github.com/gatewayd-io/gatewayd-plugin-sdk/plugin"
v1 "github.com/gatewayd-io/gatewayd-plugin-sdk/plugin/v1"
"github.com/gatewayd-io/gatewayd/config"
Expand Down

0 comments on commit 3e734cb

Please sign in to comment.