add a login timout to close dropped connections

This commit is contained in:
Jeremy Latt
2014-02-13 13:19:26 -08:00
parent 6e0ab99d38
commit 965d8efdf8
4 changed files with 26 additions and 23 deletions
+1
View File
@@ -147,6 +147,7 @@ func (s *Server) GenerateGuestNick() string {
func (s *Server) tryRegister(c *Client) {
if !c.registered && c.HasNick() && c.HasUsername() {
c.registered = true
c.loginTimer.Stop()
c.Reply(
RplWelcome(s, c),
RplYourHost(s),