Make sure the library compiles for windows
systemd sockets are not applicable for windows. However compilation should not fail on windows
This commit is contained in:
11
anyhttp.go
11
anyhttp.go
@@ -13,7 +13,6 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"go.balki.me/anyhttp/idle"
|
||||
@@ -150,16 +149,6 @@ func (u *UnixSocketConfig) GetListener() (net.Listener, error) {
|
||||
// StartFD is the starting file descriptor number
|
||||
const StartFD = 3
|
||||
|
||||
func makeFdListener(fd int, name string) (net.Listener, error) {
|
||||
fdFile := os.NewFile(uintptr(fd), name)
|
||||
l, err := net.FileListener(fdFile)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
syscall.CloseOnExec(fd)
|
||||
return l, nil
|
||||
}
|
||||
|
||||
// GetListener returns the FileListener created with socketed activated fd
|
||||
func (s *SysdConfig) GetListener() (net.Listener, error) {
|
||||
|
||||
|
Reference in New Issue
Block a user