mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-08-28 03:30:26 +02:00
Support unix domain sockets.
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"bitbucket.org/s_l_teichmann/mtsatellite/common"
|
||||
@ -59,9 +60,17 @@ func createBaseLevel(
|
||||
jobs := make(chan blockPos)
|
||||
var done sync.WaitGroup
|
||||
|
||||
var proto string
|
||||
if strings.ContainsRune(address, '/') {
|
||||
proto = "unix"
|
||||
} else {
|
||||
proto = "tcp"
|
||||
}
|
||||
|
||||
for i := 0; i < numWorkers; i++ {
|
||||
var client *common.RedisClient
|
||||
if client, err = common.NewRedisClient("tcp", address); err != nil {
|
||||
|
||||
if client, err = common.NewRedisClient(proto, address); err != nil {
|
||||
return
|
||||
}
|
||||
done.Add(1)
|
||||
|
Reference in New Issue
Block a user