1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-09-27 04:34:02 -04:00

fix lint warnings

This commit is contained in:
Darien Raymond
2018-05-31 11:55:11 +02:00
parent fe3ddb0ef5
commit adade2bffd
19 changed files with 159 additions and 80 deletions

View File

@@ -69,7 +69,9 @@ func (h *DynamicInboundHandler) closeWorkers(workers []worker) {
ports2Del := make([]net.Port, len(workers))
for idx, worker := range workers {
ports2Del[idx] = worker.Port()
worker.Close()
if err := worker.Close(); err != nil {
newError("failed to close worker").Base(err).WriteToLog()
}
}
h.portMutex.Lock()
@@ -95,7 +97,7 @@ func (h *DynamicInboundHandler) refresh() error {
for i := uint32(0); i < concurrency; i++ {
port := h.allocatePort()
rawProxy, err := h.v.CreateObject(h.proxyConfig)
rawProxy, err := core.CreateObject(h.v, h.proxyConfig)
if err != nil {
newError("failed to create proxy instance").Base(err).AtWarning().WriteToLog()
continue