Merge pull request #204 from xinkonglili/weilili

fix(broker):Added file removal for unix sock communication #203
This commit is contained in:
Eric Pearson
2024-05-24 09:38:39 +08:00
committed by GitHub
+1
View File
@@ -284,6 +284,7 @@ func (b *Broker) StartUnixSocketClientListening(socketPath string, unixSocket bo
for { for {
if unixSocket { if unixSocket {
if FileExist(socketPath) { if FileExist(socketPath) {
err = os.Remove(socketPath)
if err != nil { if err != nil {
log.Error("Remove Unix socketPath ", zap.Error(err)) log.Error("Remove Unix socketPath ", zap.Error(err))
} }