net connect: fix error/return type

pull/1461/head
Nicolas Sauzede 2019-08-04 00:56:12 +02:00 committed by Alexander Medvednikov
parent 43fb954234
commit f306fbb2f0
1 changed files with 1 additions and 1 deletions

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