mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-13 03:11:08 +08:00
enhancement: move server declaration to go func to allocate it in stack (#4739)
Fix #4735 Close #4736
This commit is contained in:
+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() {
|
go func() {
|
||||||
|
server := httpServer{
|
||||||
|
apiKey: []byte(apiKey),
|
||||||
|
actionChannel: actionChannel,
|
||||||
|
getHandler: getHandler,
|
||||||
|
}
|
||||||
for {
|
for {
|
||||||
conn, err := listener.Accept()
|
conn, err := listener.Accept()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user