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()
|
defer wg.Done()
|
||||||
for {
|
for {
|
||||||
scanner := bufio.NewScanner(conn)
|
scanner := bufio.NewScanner(conn)
|
||||||
|
buf := make([]byte, 0, 64*1024)
|
||||||
|
scanner.Buffer(buf, 209715200)
|
||||||
|
|
||||||
for {
|
for {
|
||||||
ok := scanner.Scan()
|
ok := scanner.Scan()
|
||||||
@ -72,9 +74,11 @@ func readConnection(wg *sync.WaitGroup, conn net.Conn, ws *websocket.Conn) {
|
|||||||
|
|
||||||
command := handleCommands(text)
|
command := handleCommands(text)
|
||||||
if !command {
|
if !command {
|
||||||
// fmt.Printf("\b\b** %s\n> ", text)
|
fmt.Printf("\b\b** %s\n> ", text)
|
||||||
|
|
||||||
if text == "" {
|
if text == "" {
|
||||||
|
err := scanner.Err()
|
||||||
|
fmt.Printf("err: %v\n", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user