Skip to content

Commit 95add40

Browse files
committed
1. ready变为runblocking
1 parent 2925fd7 commit 95add40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wechaty-puppet/src/main/kotlin/io/github/wechaty/status/StateSwitch.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class StateSwitch: EventEmitter(){
145145
* @param cross: 是否变换状态,默认可以
146146
* 好像可以去掉runblocking
147147
*/
148-
fun ready(state: StateEnum = StateEnum.ON, cross: Boolean = true) {
148+
fun ready(state: StateEnum = StateEnum.ON, cross: Boolean = true) = runBlocking {
149149
log.info("StateSwitch, <{}> ready({}, {})", name, state, cross)
150150

151151
// 如果准备变换的状态为on

0 commit comments

Comments
 (0)