Skip to content

Commit a7bf376

Browse files
DockedFerret800ashtum
authored andcommitted
Add missing return statements to examples
1 parent 1fc5512 commit a7bf376

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

example/advanced/server/advanced_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ class websocket_session : public std::enable_shared_from_this<websocket_session>
290290
return;
291291

292292
if(ec)
293-
fail(ec, "read");
293+
return fail(ec, "read");
294294

295295
// Echo the message
296296
ws_.text(ws_.got_text());

example/websocket/server/async-ssl/websocket_server_async_ssl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class session : public std::enable_shared_from_this<session>
151151
return;
152152

153153
if(ec)
154-
fail(ec, "read");
154+
return fail(ec, "read");
155155

156156
// Echo the message
157157
ws_.text(ws_.got_text());

example/websocket/server/fast/websocket_server_fast.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class async_session : public std::enable_shared_from_this<async_session>
210210
return;
211211

212212
if(ec)
213-
fail(ec, "read");
213+
return fail(ec, "read");
214214

215215
// Echo the message
216216
ws_.text(ws_.got_text());

example/websocket/server/stackless-ssl/websocket_server_stackless_ssl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class session
146146
return;
147147
}
148148
if(ec)
149-
fail(ec, "read");
149+
return fail(ec, "read");
150150

151151
// Echo the message
152152
ws_.text(ws_.got_text());

example/websocket/server/stackless/websocket_server_stackless.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class session
123123
return;
124124
}
125125
if(ec)
126-
fail(ec, "read");
126+
return fail(ec, "read");
127127

128128
// Echo the message
129129
ws_.text(ws_.got_text());

0 commit comments

Comments
 (0)