mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
Windows: manually check if we can bind on the configured port/ports
Windows allows the coexistence of three types of sockets on the same transport-layer service port, for example, 127.0.0.1:8080, [::1]:8080 and [::ffff:0.0.0.0]:8080 Go don't properly handles this, so we use a ugly hack Fixes #350
This commit is contained in:
@@ -211,6 +211,7 @@ func (c *Configuration) Initialize(configDir string) error {
|
||||
go func(s *Server) {
|
||||
ftpServer := ftpserver.NewFtpServer(s)
|
||||
logger.Info(logSender, "", "starting FTP serving, binding: %v", s.binding.GetAddress())
|
||||
utils.CheckTCP4Port(s.binding.Port)
|
||||
exitChannel <- ftpServer.ListenAndServe()
|
||||
}(server)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user