std.net: fix reference to incorrect constant name

This commit is contained in:
Andrew Kelley 2019-10-30 23:03:49 -04:00
parent 61d5a0bf48
commit 788848e123
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -1271,7 +1271,7 @@ pub const TcpServer = struct {
pub fn listen(self: *TcpServer, address: IpAddress) !void {
const nonblock = if (std.io.is_async) os.SOCK_NONBLOCK else 0;
const sock_flags = os.SOCK_STREAM | os.SOCK_CLOEXEC | nonblock;
const sockfd = try os.socket(os.AF_INET, sock_flags, os.PROTO_tcp);
const sockfd = try os.socket(os.AF_INET, sock_flags, os.IPPROTO_TCP);
self.sockfd = sockfd;
errdefer {
os.close(sockfd);