Skip to content

Commit

Permalink
release: 1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
oddmario committed Oct 22, 2024
1 parent ff7063e commit 5f0a528
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v1.2.7

### Fixed
* Fixed the excessive memory usage that was caused by the DNS queries logger.

### Changed
* Made the MySQL database connections start with the `autocommit=true` option to ensure that any SQL commands take effect immediately.

## v1.2.6

### Changed
Expand Down
2 changes: 1 addition & 1 deletion constants/constants.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package constants

var ConfigFilePath string = ""
var Version string = "1.2.6"
var Version string = "1.2.7"
2 changes: 1 addition & 1 deletion db/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func InitDbCredentials() {
func InitDb() {
InitDbCredentials()

database, err := sql.Open("mysql", DB_USERNAME+":"+DB_PASSWORD+"@tcp("+DB_HOST+":3306)/"+DB_NAME+"?collation=utf8mb4_general_ci")
database, err := sql.Open("mysql", DB_USERNAME+":"+DB_PASSWORD+"@tcp("+DB_HOST+":3306)/"+DB_NAME+"?collation=utf8mb4_general_ci&autocommit=true")

if err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func parseQuery(m *dns.Msg, remoteAddr net.Addr) {
q.Name = strings.ToLower(q.Name)

if config.Config.IsQueryLoggingEnabled {
go log.Printf("Query for %s from %s\n", q.Name, remoteAddr.String())
log.Printf("Query for %s from %s\n", q.Name, remoteAddr.String())
}

lastCharOfQNAME := q.Name[len(q.Name)-1:]
Expand Down

0 comments on commit 5f0a528

Please sign in to comment.