[AltServer] Fixes dropping connection before client receives response

This commit is contained in:
Riley Testut
2019-11-05 18:05:32 -08:00
parent 6ab56ad6d1
commit e249bc564e

View File

@@ -292,7 +292,10 @@ private extension ConnectionManager
self.send(response, to: connection) { (result) in
print("Sent response to \(connection.endpoint) with result:", result)
self.disconnect(connection)
// Add short delay to prevent us from dropping connection too quickly.
DispatchQueue.global().asyncAfter(deadline: .now() + 1.0) {
self.disconnect(connection)
}
}
}