We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ab37ff commit 2d13cc5Copy full SHA for 2d13cc5
compose.yml
@@ -3,4 +3,6 @@ services:
3
image: ghcr.io/garrettjoecox/anchor:latest # remote contianer
4
#build: . # local dockerfile
5
ports:
6
- - "43383:43383"
+ - "43383:43383"
7
+ volumes:
8
+ - ./stats.json:/app/stats.json #stats.json file
main.go
@@ -4,6 +4,7 @@ import (
"bufio"
"bytes"
"fmt"
+ "io"
"log"
9
"os"
10
"os/signal"
@@ -91,6 +92,11 @@ func processStdin(s *Server) {
91
92
input, err := reader.ReadString('\n')
93
94
if err != nil {
95
+ if err == io.EOF {
96
+ log.Println("Got an EOF from stdin. Closing console gorutine.")
97
+ return
98
+ }
99
+
100
log.Println("Error reading from stdin:", err)
101
continue
102
}
0 commit comments