Closed GaoShin closed 5 years ago
What does "never work" mean specifically? The URI parsing fails? Something else?
This method will return nil: (nullable instancetype)parse:(nonnull NSString )uri error:(NSError _Nullable * _Nullable)error; And I can see the error log from Xcode:
TestRabbitMQ[884:167898] Received connection: <RMQConnection: 0x283be4780> failedToConnectWithError: Error Domain=GCDAsyncSocketErrorDomain Code=2 "Invalid host parameter (nil or ""). Should be a domain name or IP address string." UserInfo={NSLocalizedDescription=Invalid host parameter (nil or ""). Should be a domain name or IP address string.}
Thanks, that's enough information to investigate.
@GaoShin master should be good to go. The limitation was intentional but artificial. No other clients impose it, so I removed it and added more tests. Thank you for reporting this!
I have tried vhost with one slash and no slash and both work fine.But if the vhost contains more than 2 slashes it will never work.Here is an example: amqp://test:test@192.168.1.3/%2fpath1%2fpath2
And then I find out that the problem is the method in RMQURI.m: