mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net.websocket: fix server not listening for IPv4 (#12717)
This commit is contained in:
@ -4,11 +4,6 @@ import net.websocket
|
||||
import time
|
||||
import rand
|
||||
|
||||
// TODO: fix connecting to ipv4 websockets
|
||||
// (the server seems to work with .ip, but
|
||||
// Client can not connect, it needs to be passed
|
||||
// .ip too?)
|
||||
|
||||
struct WebsocketTestResults {
|
||||
pub mut:
|
||||
nr_messages int
|
||||
@ -34,8 +29,7 @@ fn test_ws_ipv6() {
|
||||
|
||||
// tests with internal ws servers
|
||||
fn test_ws_ipv4() {
|
||||
// TODO: fix client
|
||||
if true || should_skip {
|
||||
if should_skip {
|
||||
return
|
||||
}
|
||||
port := 30000 + rand.intn(1024)
|
||||
@ -68,7 +62,7 @@ fn start_server(family net.AddrFamily, listen_port int) ? {
|
||||
s.on_close(fn (mut ws websocket.Client, code int, reason string) ? {
|
||||
// not used
|
||||
})
|
||||
s.listen() or {}
|
||||
s.listen() or { panic('websocket server could not listen') }
|
||||
}
|
||||
|
||||
// ws_test tests connect to the websocket server from websocket client
|
||||
|
Reference in New Issue
Block a user