[Libwebsockets] Sending close codes from server to client

Zendels, Michael Michael.Zendels at garmin.com
Wed Mar 17 02:58:14 CET 2021


Dear Andy and list,

    Thank you for libwebsockets. We are using libwebsockets on a client. We want to handle the server sending a close code of 1013 "Try Again Later", as mentioned on https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent, from the server to the client. The current code in client-parser.c in the case statement LWSWSOPC_CLOSE looks like it changes close codes to 1002 LWS_CLOSE_STATUS_PROTOCOL_ERR. This change went in 7c2868. Is there any reason why we should not pass the close code through instead of overriding it to 1002?

    Thank you for any input and help,
    Michael Zendels


________________________________

CONFIDENTIALITY NOTICE: This email and any attachments are for the sole use of the intended recipient(s) and contain information that may be Garmin confidential and/or Garmin legally privileged. If you have received this email in error, please notify the sender by reply email and delete the message. Any disclosure, copying, distribution or use of this communication (including attachments) by someone other than the intended recipient is prohibited. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20210317/1b5c0553/attachment.htm>


More information about the Libwebsockets mailing list