Remove connection timeout
Summary: This change mainly removes the connection timeout period as it may introduce a race condition in which slow server connections get terminated potentially creating connection loops. Also, suspend and wait for all operations to complete once a socket is disconnected. Reviewed By: ivanmisuno Differential Revision: D43048252 fbshipit-source-id: 64c28a3d3d2fd4e065084d5f55a17444385c07e0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d97dfae1a0
commit
e9c0a459dd
@@ -125,13 +125,7 @@ bool FlipperWebSocket::connect(FlipperConnectionManager* manager) {
|
||||
|
||||
[socket_ connect];
|
||||
|
||||
auto state = connected.wait_for(std::chrono::seconds(10));
|
||||
if (state == std::future_status::ready) {
|
||||
return connected.get();
|
||||
}
|
||||
|
||||
disconnect();
|
||||
return false;
|
||||
return connected.get();
|
||||
}
|
||||
|
||||
void FlipperWebSocket::disconnect() {
|
||||
|
||||
Reference in New Issue
Block a user