MCPcopy Create free account
hub / github.com/3rdparty/libprocess / synchronized

Function synchronized

src/posix/libevent/libevent_ssl_socket.cpp:163–179  ·  view source on GitHub ↗

Nothing to do if this socket was never initialized.

Source from the content-addressed store, hash-verified

161{
162 // Nothing to do if this socket was never initialized.
163 synchronized (lock) {
164 if (bev == nullptr) {
165 // If it was not initialized, then there should also be no
166 // requests.
167 CHECK(connect_request.get() == nullptr);
168 CHECK(recv_request.get() == nullptr);
169 CHECK(send_request.get() == nullptr);
170
171 // We expect this to fail and generate an 'ENOTCONN' failure as
172 // no connection should exist at this point.
173 if (::shutdown(s, how) < 0) {
174 return SocketError();
175 }
176
177 return Nothing();
178 }
179 }
180
181 // Extend the life-time of 'this' through the execution of the
182 // lambda in the event loop. Note: The 'self' needs to be explicitly

Callers 5

shutdownMethod · 0.70
connectMethod · 0.70
recvMethod · 0.70
sendMethod · 0.70
sendfileMethod · 0.70

Calls 2

FailureClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected