1
0
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:
Nicolas Sauzede 2019-08-04 00:56:12 +02:00 committed by Alexander Medvednikov
parent 43fb954234
commit f306fbb2f0

View File

@ -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')
}