Skip to content

Commit

Permalink
fix: remove useless change
Browse files Browse the repository at this point in the history
  • Loading branch information
int7 committed Nov 10, 2023
1 parent e68f1ca commit 4502159
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
6 changes: 0 additions & 6 deletions client/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func NewControl(

ctl.msgDispatcher = msg.NewDispatcher(cryptoRW)
ctl.registerMsgHandlers()

ctl.msgTransporter = transport.NewMessageTransporter(ctl.msgDispatcher.SendChannel())

ctl.pm = proxy.NewManager(ctl.ctx, clientCfg, ctl.msgTransporter)
Expand Down Expand Up @@ -134,12 +133,10 @@ func (ctl *Control) handleReqWorkConn(_ msg.Message) {
m := &msg.NewWorkConn{
RunID: ctl.runID,
}

if err = ctl.authSetter.SetNewWorkConn(m); err != nil {
xl.Warn("error during NewWorkConn authentication: %v", err)
return
}

if err = msg.WriteMsg(workConn, m); err != nil {
xl.Warn("work connection write to server error: %v", err)
workConn.Close()
Expand All @@ -152,7 +149,6 @@ func (ctl *Control) handleReqWorkConn(_ msg.Message) {
workConn.Close()
return
}

if startMsg.Error != "" {
xl.Error("StartWorkConn contains error: %s", startMsg.Error)
workConn.Close()
Expand All @@ -165,9 +161,7 @@ func (ctl *Control) handleReqWorkConn(_ msg.Message) {

func (ctl *Control) handleNewProxyResp(m msg.Message) {
xl := ctl.xl

inMsg := m.(*msg.NewProxyResp)

// Server will return NewProxyResp message to each NewProxy message.
// Start a new proxy handler if no error got
err := ctl.pm.StartProxy(inMsg.ProxyName, inMsg.RemoteAddr, inMsg.Error)
Expand Down
1 change: 0 additions & 1 deletion client/proxy/proxy_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ func (pw *Wrapper) checkWorker() {
var newProxyMsg msg.NewProxy
pw.Cfg.MarshalToMsg(&newProxyMsg)
pw.lastSendStartMsg = now

_ = pw.handler(&event.StartProxyPayload{
NewProxyMsg: &newProxyMsg,
})
Expand Down
1 change: 0 additions & 1 deletion pkg/config/legacy/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ type ServerCommonConf struct {
// BindPort specifies the port that the server listens on. By default, this
// value is 7000.
BindPort int `ini:"bind_port" json:"bind_port"`

// KCPBindPort specifies the KCP port that the server listens on. If this
// value is 0, the server will not listen for KCP connections. By default,
// this value is 0.
Expand Down
1 change: 0 additions & 1 deletion server/proxy/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func (pxy *TCPProxy) Run() (remoteAddr string, err error) {
pxy.rc.TCPPortManager.Release(pxy.realBindPort)
}
}()

listener, errRet := net.Listen("tcp", net.JoinHostPort(pxy.serverCfg.ProxyBindAddr, strconv.Itoa(pxy.realBindPort)))
if errRet != nil {
err = errRet
Expand Down

0 comments on commit 4502159

Please sign in to comment.