diff options
author | Omar Polo <op@omarpolo.com> | 2024-07-02 22:00:01 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2024-07-02 22:00:01 +0000 |
commit | 55ae6c66b2be05e4355b9434a689b19a31a4d693 (patch) | |
tree | 0f2e2228a4c49bbfdabd18f1a1a4cfce05db224d /proxy.c | |
parent | 7249505e3541e039ee31d003ba7eb27e94f31fd5 (diff) |
proxy: inline the `goto retry'
Diffstat (limited to 'proxy.c')
-rw-r--r-- | proxy.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -55,7 +55,8 @@ proxy_tls_readcb(int fd, short event, void *d) switch (ret = tls_read(c->proxyctx, buf, howmuch)) { case TLS_WANT_POLLIN: case TLS_WANT_POLLOUT: - goto retry; + event_add(&bufev->ev_read, NULL); + return; case -1: what |= EVBUFFER_ERROR; goto err; @@ -83,10 +84,6 @@ proxy_tls_readcb(int fd, short event, void *d) (*bufev->readcb)(bufev, bufev->cbarg); return; -retry: - event_add(&bufev->ev_read, NULL); - return; - err: (*bufev->errorcb)(bufev, what, bufev->cbarg); } @@ -111,7 +108,8 @@ proxy_tls_writecb(int fd, short event, void *d) switch (ret) { case TLS_WANT_POLLIN: case TLS_WANT_POLLOUT: - goto retry; + event_add(&bufev->ev_write, NULL); + return; case -1: what |= EVBUFFER_ERROR; goto err; @@ -129,10 +127,6 @@ proxy_tls_writecb(int fd, short event, void *d) (*bufev->writecb)(bufev, bufev->cbarg); return; -retry: - event_add(&bufev->ev_write, NULL); - return; - err: (*bufev->errorcb)(bufev, what, bufev->cbarg); } |