Skip to content

Commit

Permalink
feat: add cleanup for for clientAndLocatrs dict
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj319 committed Dec 26, 2024
1 parent 3b415ed commit d69c6bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ func acceptConnection(fd net.Conn) {
}
continue
}

defer delete(clientAndLocatrs, clientMessage.ClientId)

switch clientMessage.Type {
case "initial_handshake":
err := handleInitialHandshake(clientMessage)
Expand Down Expand Up @@ -211,6 +214,7 @@ func acceptConnection(fd net.Conn) {
}
}
}

}

func main() {
Expand Down

0 comments on commit d69c6bd

Please sign in to comment.