Skip to content

Commit

Permalink
Merge branch 'jb53356_backend_timeout' into 'master'
Browse files Browse the repository at this point in the history
Allow longer delay at usb backend probing

See merge request mer-core/usb-moded!76
  • Loading branch information
spiiroin committed Mar 2, 2021
2 parents 9c83acd + eb008de commit 8b86ea3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/usb_moded.c
Expand Up @@ -795,6 +795,10 @@ static bool usbmoded_init(void)
* not be already in there when usb-moded starts up.
* Retry few times unless init done is / gets reached
* while waiting.
*
* Note that waiting here delays also systemd notification
* -> changes in wait time might require adjustemnts to
* startup timeout value in usb-moded.service file.
*/
for( int i = 10; ; ) {
if( configfs_init() )
Expand All @@ -812,7 +816,7 @@ static bool usbmoded_init(void)
break;
}

common_msleep(1000);
common_msleep(2000);
}

/* Allow making systemd control ipc */
Expand Down
2 changes: 1 addition & 1 deletion systemd/usb-moded.service
Expand Up @@ -8,7 +8,7 @@ Conflicts=shutdown.target

[Service]
Type=notify
TimeoutSec=15
TimeoutSec=25
EnvironmentFile=-/var/lib/environment/usb-moded/*.conf
EnvironmentFile=-/run/usb-moded/*.conf
ExecStart=/usr/sbin/usb_moded --systemd --force-syslog $USB_MODED_ARGS $USB_MODED_HW_ADAPTATION_ARGS
Expand Down

0 comments on commit 8b86ea3

Please sign in to comment.