Set the listener of the server when opened.
This commit is contained in:
parent
dd300b24fc
commit
9dc30bb9e8
1 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,8 @@ func listenTCP(s *Server, port string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
s.listener = ln
|
||||
|
||||
for {
|
||||
conn, err := ln.Accept()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue