Skip to content

Commit

Permalink
send WSOC_CLOSE when closing websocket conenction (per protocol).
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragos Oancea committed Oct 19, 2023
1 parent 6a4bc39 commit 4d7e6e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/kws.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ KS_DECLARE(ks_ssize_t) kws_close(kws_t *kws, int16_t reason)
kws->uri = NULL;
}

if (reason && kws->sock != KS_SOCK_INVALID) {
if (kws->sock != KS_SOCK_INVALID) {
uint16_t *u16;
uint8_t fr[4] = {WSOC_CLOSE | 0x80, 2, 0};

Expand Down

0 comments on commit 4d7e6e5

Please sign in to comment.