diff options
author | Gurucharan Shetty <gshetty@nicira.com> | 2014-03-27 16:39:35 -0700 |
---|---|---|
committer | Gurucharan Shetty <gshetty@nicira.com> | 2014-03-28 10:53:47 -0700 |
commit | 508caab4ac3300f4023ce8650a5e2a40bc91d4c7 (patch) | |
tree | f3ac4e2a53be7a84a36e9d302359ae2aad91bc98 /lib/stream-tcp.c | |
parent | 156f7a40e3f93a4498b6d16bf698c624a81ad1fb (diff) | |
download | openvswitch-508caab4ac3300f4023ce8650a5e2a40bc91d4c7.tar.gz |
stream-tcp: Use closesocket instead of close for sockets.
We should use closesocket() while closing sockets so that
closing sockets work fine on both POSIX and Windows.
(In POSIX, we #define closesocket close)
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'lib/stream-tcp.c')
-rw-r--r-- | lib/stream-tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stream-tcp.c b/lib/stream-tcp.c index 4cd4e6f18..d62e9c37e 100644 --- a/lib/stream-tcp.c +++ b/lib/stream-tcp.c @@ -58,7 +58,7 @@ new_tcp_stream(const char *name, int fd, int connect_status, int error = sock_errno(); VLOG_ERR("%s: setsockopt(TCP_NODELAY): %s", name, sock_strerror(error)); - close(fd); + closesocket(fd); return error; } |