mirror of
https://github.com/schoebel/mars
synced 2025-02-17 04:26:53 +00:00
fix blocking of server
This commit is contained in:
parent
3ef01a98db
commit
c5a9ad16ff
@ -186,13 +186,13 @@ struct mars_socket *mars_accept_socket(struct mars_socket *msock, bool do_block)
|
||||
if (unlikely(status < 0)) {
|
||||
goto err;
|
||||
}
|
||||
if (unlikely(!new_socket || !new_socket->file)) {
|
||||
if (unlikely(!new_socket)) {
|
||||
status = -EBADF;
|
||||
goto err;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (!do_block) { // switch back to blocking mode
|
||||
#if 0 // do not use for now
|
||||
if (!do_block && new_socket->file) { // switch back to blocking mode
|
||||
new_socket->file->f_flags &= ~O_NONBLOCK;
|
||||
}
|
||||
#endif
|
||||
|
@ -569,7 +569,8 @@ static int _server_thread(void *data)
|
||||
|
||||
while (!kthread_should_stop() &&
|
||||
(!mars_global || !mars_global->global_power.button)) {
|
||||
msleep(1000);
|
||||
MARS_DBG("system did not start up\n");
|
||||
msleep(5000);
|
||||
}
|
||||
|
||||
MARS_INF("-------- server now working on host '%s' ----------\n", id);
|
||||
|
Loading…
Reference in New Issue
Block a user