Skip to content
Snippets Groups Projects
Commit 23a7ce80 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Vladimir Davydov
Browse files

net.box: allow to pass table uri to connect

There are two acceptable ways of calling `connect` - as a method of
the net.box module or as a function defined in the module:

```lua
local net = require('net.box')
net.connect(...)
net:connect(...)
```

We determine which one is used by checking the type of the first
argument: if it's a table, we assume that the function is called as
a method. However, the first argument can be a table itself - in case
it's a URI given in the extended format.

Let's fix this check by comparing the first argument against the net.box
module. Let's also add a test checking all possible combinations of
`connect` arguments.

Follow-up 0badb413 ("net.box: pass uri
instead of host and port to state machine").
parent 197088c3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment