Merge remote-tracking branch 'upstream/master'

pull/2131/head
MenkeTechnologies 3 months ago
commit 8a649d3a7b

@ -212,9 +212,12 @@ Add the following line to your shell configuration file.
```
> [!NOTE]
> `--bash`, `--zsh`, and `--fish` options are only available in
> fzf 0.48.0 or above. If you have an older version of fzf, refer to the
> package documentation for more information. (e.g. `apt show fzf`)
> `--bash`, `--zsh`, and `--fish` options are only available in fzf 0.48.0 or
> later. If you have an older version of fzf, or want finer control, you can
> source individual script files in the [/shell](/shell) directory. The
> location of the files may vary depending on the package manager you use.
> Please refer to the package documentation for more information.
> (e.g. `apt show fzf`)
> [!TIP]
> You can disable CTRL-T or ALT-C binding by setting `FZF_CTRL_T_COMMAND` or

@ -32,6 +32,7 @@ const (
httpUnauthorized = "HTTP/1.1 401 Unauthorized" + crlf
httpUnavailable = "HTTP/1.1 503 Service Unavailable" + crlf
httpReadTimeout = 10 * time.Second
channelTimeout = 2 * time.Second
jsonContentType = "Content-Type: application/json" + crlf
maxContentLength = 1024 * 1024
)
@ -170,7 +171,7 @@ func (server *httpServer) handleHttpRequest(conn net.Conn) string {
select {
case response := <-server.responseChannel:
return good(response)
case <-time.After(2 * time.Second):
case <-time.After(channelTimeout):
go func() {
// Drain the channel
<-server.responseChannel
@ -227,7 +228,11 @@ func (server *httpServer) handleHttpRequest(conn net.Conn) string {
return bad("no action specified")
}
server.actionChannel <- actions
select {
case server.actionChannel <- actions:
case <-time.After(channelTimeout):
return httpUnavailable + crlf
}
return httpOk + crlf
}

@ -776,7 +776,7 @@ func NewTerminal(opts *Options, eventBox *util.EventBox) *Terminal {
theme: opts.Theme,
startChan: make(chan fitpad, 1),
killChan: make(chan int),
serverInputChan: make(chan []*action, 10),
serverInputChan: make(chan []*action, 100),
serverOutputChan: make(chan string),
eventChan: make(chan tui.Event, 6), // (load + result + zero|one) | (focus) | (resize) | (GetChar)
tui: renderer,

Loading…
Cancel
Save