소스 검색

Feat: add transport original name to listen unix (#2048)

秋のかえで 3 년 전
부모
커밋
b9a8a7e237
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      transport/internet/tcp_hub.go

+ 5 - 0
transport/internet/tcp_hub.go

@@ -36,6 +36,11 @@ func ListenUnix(ctx context.Context, address net.Address, settings *MemoryStream
 	}
 
 	protocol := settings.ProtocolName
+
+	if originalProtocolName := getOriginalMessageName(settings); originalProtocolName != "" {
+		protocol = originalProtocolName
+	}
+
 	listenFunc := transportListenerCache[protocol]
 	if listenFunc == nil {
 		return nil, newError(protocol, " unix istener not registered.").AtError()