Open Xeneou opened 6 years ago
@Xeneou how exactly are you starting the debugger? (delve)
I has experienced such behavior when I have tried android build, and in my case it was because of android doesn't have an os.StdIn
interface for concole direct input.
So, my suggestion is to check interface in stdReader := bufio.NewReader(os.Stdin)
in func writeData(rw *bufio.ReadWriter)
Compiling and running the binaries works fine. However, when I try to debug the code I get a panic on the server side, immediately after the client connects.
Panic:
Problems seems to be that the
stdReader
inwriteData()
receives no bytes instdReader.ReadString('\n')
Can somebody explain/reproduce this or has a solution? Debugging would be nice to follow and understand the program's control flow. (Debugging of the echo example works and doesn't cause a panic.)
go env https://gist.githubusercontent.com/Xeneou/49411ca2a96c0792d4f3d5efac807b7d/raw/9d5ad32802ffb9112a5aab07ac311e7bb54f8fca/details.md
go-libp2p-examples/chat 513da5f2d111eec90b562725015fa04f1cd139e5
go-libp2p libp2p/go-libp2p@163d7d40dd00bf4c275a164d60fc55e3a34a6073