Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcp: remove very old iOS hack #525

Merged
merged 1 commit into from
Sep 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions src/tcp/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
#define _GNU_SOURCE 1
#include <netdb.h>
#endif
#ifdef __APPLE__
#include "TargetConditionals.h"
#endif
#include <string.h>
#include <re_types.h>
#include <re_fmt.h>
Expand Down Expand Up @@ -535,36 +532,6 @@ static void tcp_conn_handler(int flags, void *arg)

ts->fdc = accept(ts->fd, &peer.u.sa, &peer.len);
if (ts->fdc == BAD_SOCK) {

#if TARGET_OS_IPHONE
if (EAGAIN == errno) {

struct tcp_sock *ts_new;
struct sa laddr;

err = tcp_sock_local_get(ts, &laddr);
if (err)
return;

if (ts->fd >= 0) {
fd_close(ts->fd);
(void)close(ts->fd);
ts->fd = BAD_SOCK;
}

err = tcp_listen(&ts_new, &laddr, NULL, NULL);
if (err)
return;

ts->fd = ts_new->fd;
ts_new->fd = BAD_SOCK;

mem_deref(ts_new);

fd_listen(ts->fd, FD_READ, tcp_conn_handler, ts);
}
#endif

return;
}

Expand Down