Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error message to Websocket onerror handler #476

Merged
merged 4 commits into from
Jun 21, 2022
Merged

Conversation

The-EDev
Copy link
Member

Closes #454

also snuck in, fix for GCC warning about comparing pointer addition against nullptr (which was a legitimate error in the code)

@crow-clang-format
Copy link

--- include/crow/json.h	(before formatting)
+++ include/crow/json.h	(after formatting)
@@ -1852,9 +1852,9 @@
                                     case start: // Loop and lookahead until a decimal point is found
                                         if (ch == '.')
                                         {
-                                            char fch  = *(p + 1);
+                                            char fch = *(p + 1);
                                             // if the first character is 0, leave it be (this is so that "1.00000" becomes "1.0" and not "1.")
-                                            if ( fch != '\0' && fch == '0') p++;
+                                            if (fch != '\0' && fch == '0') p++;
                                             f_state = decp;
                                         }
                                         p++;

@The-EDev The-EDev merged commit 8d7e53d into master Jun 21, 2022
@The-EDev The-EDev deleted the ws-error-reason branch June 21, 2022 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Websockets: error-handler could include reason
2 participants