mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net connect: fix error/return type
This commit is contained in:
parent
43fb954234
commit
f306fbb2f0
@ -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')
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user