Add onError callback to handle errors in protocol threads

This commit is contained in:
albexk 2023-12-05 13:47:12 +03:00
parent 5c3e253067
commit 5835a756ce
5 changed files with 28 additions and 27 deletions

View file

@ -78,8 +78,8 @@ open class Wireguard : Protocol() {
}
}
override fun initialize(context: Context, state: MutableStateFlow<ProtocolState>) {
super.initialize(context, state)
override fun initialize(context: Context, state: MutableStateFlow<ProtocolState>, onError: (String) -> Unit) {
super.initialize(context, state, onError)
loadSharedLibrary(context, "wg-go")
}