Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

UI Hangs when running an app #1044

Closed
Closed

Description

@tehsis

Issue

When running the go app below, the ui gets frozen. I can hardly stop the app (ctrl+c) and most of the time I need to kill Hyper.

it seems to be caused by the line io.Copy(ioutil.Discard, resp.Body)

however, when running the exact same app in other terminal emulator (for instance, iTerm), everything goes fine.

package main

import (
	"fmt"
	"html"
	"io"
	"io/ioutil"
	"log"
	"net/http"
)

func main() {
	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))
	})

	go http.ListenAndServe(":8080", nil)

	count := 0
	for {
		resp, err := http.Get("http://localhost:8080/")
		if err != nil {
			panic(fmt.Sprintf("Error: %v", err))
		}
		io.Copy(ioutil.Discard, resp.Body)
		resp.Body.Close()
		log.Printf("Request #%v", count)
		count++
	}
}

Activity

  1. nervetattoo commented on Dec 19, 2016

    @nervetattoo

    I have the same experience when running docker logs -f, which also happens to be using
    io.Copy in go. The entire UI freezes, and cmd+c takes about 10-20 seconds to kill the program and give me back control of Hyper.


  2. timothyis commented on Apr 23, 2018

    @timothyis
    Contributor

    I believe this was an issue related to big logs slowing Hyper down. Since there has been no activity on this issue for a while, and I think this is fixed, I'll close this issue 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions