aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.go b/main.go
index 15b8341..bd26db0 100644
--- a/main.go
+++ b/main.go
@@ -20,7 +20,7 @@ const (
func handler(conn net.Conn, gm *GameManager, config *ssh.ServerConfig) {
// Before use, a handshake must be performed on the incoming
// net.Conn.
- _, chans, reqs, err := ssh.NewServerConn(conn, config)
+ sshConn, chans, reqs, err := ssh.NewServerConn(conn, config)
if err != nil {
fmt.Println("Failed to handshake with new client")
return
@@ -66,7 +66,7 @@ func handler(conn net.Conn, gm *GameManager, config *ssh.ServerConfig) {
}
}(requests)
- gm.HandleChannel <- channel
+ gm.HandleNewChannel(channel, sshConn.User())
}
}
@@ -102,7 +102,6 @@ func main() {
// Create the GameManager
gm := NewGameManager()
- go gm.Run()
fmt.Printf(
"Listening on port %s for SSH and port %s for HTTP...\n",
Un proyecto texto-plano.xyz