Browse Source

Fix #1376

pull/1379/head
Max Lv 7 years ago
parent
commit
cfe830405f
1 changed files with 2 additions and 1 deletions
  1. 3
      src/redir.c

3
src/redir.c

@ -453,6 +453,8 @@ remote_send_cb(EV_P_ ev_io *w, int revents)
remote_t *remote = remote_send_ctx->remote; remote_t *remote = remote_send_ctx->remote;
server_t *server = remote->server; server_t *server = remote->server;
ev_timer_stop(EV_A_ & remote_send_ctx->watcher);
if (!remote_send_ctx->connected) { if (!remote_send_ctx->connected) {
int r = 0; int r = 0;
if (remote->addr == NULL) { if (remote->addr == NULL) {
@ -465,7 +467,6 @@ remote_send_cb(EV_P_ ev_io *w, int revents)
remote_send_ctx->connected = 1; remote_send_ctx->connected = 1;
ev_io_stop(EV_A_ & remote_send_ctx->io); ev_io_stop(EV_A_ & remote_send_ctx->io);
ev_io_stop(EV_A_ & server->recv_ctx->io); ev_io_stop(EV_A_ & server->recv_ctx->io);
ev_timer_stop(EV_A_ & remote_send_ctx->watcher);
ev_timer_start(EV_A_ & remote->recv_ctx->watcher); ev_timer_start(EV_A_ & remote->recv_ctx->watcher);
// send destaddr // send destaddr

Loading…
Cancel
Save