Set the listener of the server when opened.

This commit is contained in:
anthdm 2018-01-31 14:32:57 +01:00 committed by Anthony De Meulemeester
parent 1ba6605f38
commit 283f3c5a89

View file

@ -11,6 +11,8 @@ func listenTCP(s *Server, port string) error {
return err return err
} }
s.listener = ln
for { for {
conn, err := ln.Accept() conn, err := ln.Accept()
if err != nil { if err != nil {