File tree 1 file changed +13
-13
lines changed
1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -200,23 +200,23 @@ void TcpTransport::resolve() {
200
200
}
201
201
202
202
void TcpTransport::attempt () {
203
- std::lock_guard lock (mSendMutex );
203
+ try {
204
+ std::lock_guard lock (mSendMutex );
204
205
205
- if (state () != State::Connecting)
206
- return ; // Cancelled
206
+ if (state () != State::Connecting)
207
+ return ; // Cancelled
207
208
208
- if (mSock == INVALID_SOCKET) {
209
- ::closesocket (mSock );
210
- mSock = INVALID_SOCKET;
211
- }
209
+ if (mSock == INVALID_SOCKET) {
210
+ ::closesocket (mSock );
211
+ mSock = INVALID_SOCKET;
212
+ }
212
213
213
- if (mResolved .empty ()) {
214
- PLOG_WARNING << " Connection to " << mHostname << " :" << mService << " failed" ;
215
- changeState (State::Failed);
216
- return ;
217
- }
214
+ if (mResolved .empty ()) {
215
+ PLOG_WARNING << " Connection to " << mHostname << " :" << mService << " failed" ;
216
+ changeState (State::Failed);
217
+ return ;
218
+ }
218
219
219
- try {
220
220
auto [addr, addrlen] = mResolved .front ();
221
221
mResolved .pop_front ();
222
222
You can’t perform that action at this time.
0 commit comments