Skip to content

Commit

Permalink
add the missing close check
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed May 31, 2024
1 parent 3a3879b commit 0e1cc60
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tunnels/client/halfduplex/halfduplex_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "frand.h"
#include "shiftbuffer.h"
#include "halfduplex_constants.h"
#include "tunnel.h"
#include <stdatomic.h>
#include <stdint.h>
#include <stdlib.h>
Expand Down Expand Up @@ -76,7 +77,14 @@ static void upStream(tunnel_t *self, context_t *c)
writeUI8(intro_context->payload, kHLFDCmdDownload);

self->up->upStream(self->up, intro_context);


if (! isAlive(c->line))
{
reuseContextBuffer(c);
destroyContext(c);
return;
}

shiftl(c->payload, 2);
writeUI16(c->payload, cid);
shiftl(intro_context->payload, 1);
Expand Down

0 comments on commit 0e1cc60

Please sign in to comment.