Add more pubsub fuzzing

This commit is contained in:
Alex Hultman
2021-09-12 14:35:51 +02:00
parent e669c7017c
commit 78d20fd103
5 changed files with 123 additions and 1 deletions
+10
View File
@@ -73,8 +73,18 @@ protected:
return us_socket_close(SSL, (us_socket_t *) this, 0, nullptr);
}
void corkUnchecked() {
/* What if another socket is corked? */
getLoopData()->corkedSocket = this;
}
/* Cork this socket. Only one socket may ever be corked per-loop at any given time */
void cork() {
/* Extra check for invalid corking of others */
if (getLoopData()->corkOffset && getLoopData()->corkedSocket != this) {
std::abort();
}
/* What if another socket is corked? */
getLoopData()->corkedSocket = this;
}
+1 -1
View File
@@ -287,7 +287,7 @@ public:
/* For whatever reason we were corked, update cork to the new socket */
if (wasCorked) {
webSocket->AsyncSocket<SSL>::cork();
webSocket->AsyncSocket<SSL>::corkUnchecked();
}
/* Initialize websocket with any moved backpressure intact */