Moving to unprivileged port.
This commit is contained in:
1 parent
9610fc5322
commit
d8d942f8e5
2 files changed
+6
-2
No files matched your search
+1
-1
@@ -8,6 +8,6 @@ import (
|
||||
func main() {
|
||||
fmt.Println("Server v0.04")
|
||||
server := server.NewServer()
|
||||
server.Start(501)
|
||||
server.Start(5001)
|
||||
|
||||
}
|
||||
@@ -82,7 +82,11 @@ func (s *Server) HandleClient(conn net.Conn, id int) {
|
||||
lengthBuf := make([]byte, 4)
|
||||
_, err := io.ReadFull(conn, lengthBuf)
|
||||
if err != nil {
|
||||
fmt.Println("failed to read length prefix: ", err)
|
||||
if err == io.EOF {
|
||||
fmt.Println("client closed connection")
|
||||
} else {
|
||||
fmt.Println("failed to read length prefix: ", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user