-
Couldn't load subscription status.
- Fork 89
Open
Description
This issue is much more easier I think that #456 but on my stress test, it's about:
Lines 633 to 653 in 9676ef3
| let getid t dst dst_port = | |
| (* TODO: make this more robust and recognise when all ports are gone *) | |
| let islistener _t _port = | |
| (* TODO keep a list of active listen ports *) | |
| false in | |
| let idinuse t id = | |
| Hashtbl.mem t.channels id || | |
| Hashtbl.mem t.connects id || | |
| Hashtbl.mem t.listens id | |
| in | |
| let inuse t id = islistener t (WIRE.src_port id) || idinuse t id in | |
| let rec bumpport t = | |
| (match t.localport with | |
| | 65535 -> t.localport <- 10000 | |
| | _ -> t.localport <- t.localport + 1); | |
| let id = | |
| WIRE.v ~src:(Ip.src t.ip ~dst) ~src_port:t.localport ~dst ~dst_port | |
| in | |
| if inuse t id then bumpport t else id | |
| in | |
| bumpport t |
At one stage, the server just block any concurrent processes. I will try to find a convenient way to fix this issue. TODO tells me that such case was never reached before.
Metadata
Metadata
Assignees
Labels
No labels