mirror of
https://github.com/Li4n0/revsuit.git
synced 2026-09-21 22:30:46 +08:00
fix(mysql): fix the bug that crashes when mysql port conflicts
This commit is contained in:
+2
-1
@@ -302,10 +302,11 @@ func (s *Server) Run() {
|
||||
s.listener, err = vmysql.NewListener("tcp", s.Addr, authServer, s, s.VersionString, 0, 0)
|
||||
if err != nil {
|
||||
log.Error("New MySQL Server failed: %s", err)
|
||||
return
|
||||
}
|
||||
|
||||
go func() {
|
||||
|
||||
s.livingLock.Lock()
|
||||
if !s.Enable {
|
||||
s.listener.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user