Browse Source

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

秋のかえで 3 years ago
parent
commit
b9a8a7e237
1 changed files with 5 additions and 0 deletions
  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()