Stop panics

This commit is contained in:
Neil Alexander 2020-12-01 10:08:52 +00:00
parent 8a53352b03
commit fba64a28dc
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -123,12 +123,14 @@ func main() {
for {
conn, err := listener.Accept()
if err != nil {
panic(err)
logrus.WithError(err).Error("listener.Accept failed")
continue
}
port, err := pSwitch.AuthenticatedConnect(conn, "")
if err != nil {
panic(err)
logrus.WithError(err).Error("pSwitch.AuthenticatedConnect failed")
continue
}
fmt.Println("Inbound connection", conn.RemoteAddr(), "is connected to port", port)