#1351 renamed to hadshake

This commit is contained in:
gouri-panda 2020-11-05 17:15:48 +05:30
parent 11343a694a
commit 77d894a911
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ import java.util.ArrayList
*/
internal class PeerGroupHandshake(private val wifiDirectManager: WifiDirectManager) {
private val HANDSHAKE_MESSAGE = "Request Kiwix File Sharing"
suspend fun peer(): InetAddress? = withContext(Dispatchers.IO) {
suspend fun handshake(): InetAddress? = withContext(Dispatchers.IO) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "Handshake in progress")
}

View File

@ -246,7 +246,7 @@ class WifiDirectManager @Inject constructor(
peerGroupHandshake = PeerGroupHandshake(this)
.also {
lifecycleCoroutineScope.launch {
val inetAddress = it.peer()
val inetAddress = it.handshake()
inetAddress?.let(::setClientAddress) ?: if (BuildConfig.DEBUG) {
Log.d(TAG, "InetAddress is null")
displayToast(R.string.connection_refused, "", Toast.LENGTH_LONG)