|
|
|
@ -35,7 +35,11 @@ func listener(g *gocui.Gui, conn net.Conn) {
|
|
|
|
|
}
|
|
|
|
|
for {
|
|
|
|
|
reply := make([]byte, 2048)
|
|
|
|
|
conn.Read(reply)
|
|
|
|
|
_, err := conn.Read(reply)
|
|
|
|
|
if err != nil {
|
|
|
|
|
g.Close()
|
|
|
|
|
log.Fatalf("Server closed connection\n")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fmt.Fprintln(chatbox, string(reply))
|
|
|
|
|
termbox.Interrupt()
|
|
|
|
|