mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-07 04:34:41 +08:00
enhancement: move server declaration to go func to allocate it in stack (#4739)
Fix #4735 Close #4736
This commit is contained in:
1 parent
14e3995a06
commit
1acf980e95
1 file changed
+5
-6
+5
-6
@@ -122,13 +122,12 @@ func startHttpServer(address listenAddress, actionChannel chan []*action, getHan
|
||||
}
|
||||
}
|
||||
|
||||
server := httpServer{
|
||||
apiKey: []byte(apiKey),
|
||||
actionChannel: actionChannel,
|
||||
getHandler: getHandler,
|
||||
}
|
||||
|
||||
go func() {
|
||||
server := httpServer{
|
||||
apiKey: []byte(apiKey),
|
||||
actionChannel: actionChannel,
|
||||
getHandler: getHandler,
|
||||
}
|
||||
for {
|
||||
conn, err := listener.Accept()
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user