From f306fbb2f024c8cad3da29a21b5691f9d0e87113 Mon Sep 17 00:00:00 2001 From: Nicolas Sauzede Date: Sun, 4 Aug 2019 00:56:12 +0200 Subject: [PATCH] net connect: fix error/return type --- vlib/net/socket.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/net/socket.v b/vlib/net/socket.v index e6ef6146e5..093323937c 100644 --- a/vlib/net/socket.v +++ b/vlib/net/socket.v @@ -188,7 +188,7 @@ pub fn (s Socket) connect(address string, port int) ?int { if info_res != 0 { return error('socket: connect failed') } - res := C.connect(s.sockfd, info.ai_addr, info.ai_addrlen) + res := int(C.connect(s.sockfd, info.ai_addr, info.ai_addrlen)) if res < 0 { return error('socket: connect failed') }