Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit f3f08b6

Browse files
Darin726YorkShen
authored andcommitted
Throw exception if create pthread failed (#2300)
1 parent 84192ba commit f3f08b6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

weex_core/Source/android/multiprocess/weex_js_connection.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ IPCSender *WeexJSConnection::start(IPCHandler *handler, IPCHandler *serverHandle
218218
pthread_attr_init(&threadAttr);
219219
pthread_t ipcServerThread;
220220
int i = pthread_create(&ipcServerThread, &threadAttr, newIPCServer, &td);
221+
if(i != 0) {
222+
throw IPCException("failed to create ipc server thread");
223+
}
224+
221225
while (newThreadStatus == UNFINISH) {
222226
continue;
223227
}

0 commit comments

Comments
 (0)