mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-21 01:45:39 +00:00
Increase the buffer of the scanner
This commit is contained in:
parent
66046999cc
commit
362da8d70a
@ -65,6 +65,8 @@ func readConnection(wg *sync.WaitGroup, conn net.Conn, ws *websocket.Conn) {
|
||||
defer wg.Done()
|
||||
for {
|
||||
scanner := bufio.NewScanner(conn)
|
||||
buf := make([]byte, 0, 64*1024)
|
||||
scanner.Buffer(buf, 209715200)
|
||||
|
||||
for {
|
||||
ok := scanner.Scan()
|
||||
@ -72,9 +74,11 @@ func readConnection(wg *sync.WaitGroup, conn net.Conn, ws *websocket.Conn) {
|
||||
|
||||
command := handleCommands(text)
|
||||
if !command {
|
||||
// fmt.Printf("\b\b** %s\n> ", text)
|
||||
fmt.Printf("\b\b** %s\n> ", text)
|
||||
|
||||
if text == "" {
|
||||
err := scanner.Err()
|
||||
fmt.Printf("err: %v\n", err)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user