Skip to content

Commit

Permalink
fixes related to new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed May 14, 2024
1 parent 3421a89 commit af1ce1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tunnels/adapters/connector/tcp/tcp_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,15 @@ static void upStream(tunnel_t *self, context_t *c)
unsigned int bytes = bufLen(c->payload);
int nwrite = hio_write(cstate->io, c->payload);
c->payload = NULL;
destroyContext(c);

if (nwrite >= 0 && nwrite < bytes)
{
pauseLineDownSide(c->line);
cstate->write_paused = true;
hio_setcb_write(cstate->io, onWriteComplete);
}
destroyContext(c);

}
}
else
Expand Down
3 changes: 2 additions & 1 deletion tunnels/adapters/listener/tcp/tcp_listener.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,15 @@ static void downStream(tunnel_t *self, context_t *c)
unsigned int bytes = bufLen(c->payload);
int nwrite = hio_write(cstate->io, c->payload);
c->payload = NULL;
destroyContext(c);

if (nwrite >= 0 && nwrite < bytes)
{
pauseLineUpSide(c->line);
cstate->write_paused = true;
hio_setcb_write(cstate->io, onWriteComplete);
}
destroyContext(c);

}
}
else
Expand Down

0 comments on commit af1ce1a

Please sign in to comment.