Commit 8367ac24 authored by Mike Hibler's avatar Mike Hibler

Increase the timeout when talking to the master server.

parent e87ab05c
......@@ -81,12 +81,31 @@ int
main(int argc, char **argv)
{
PutReply reply;
int timo = 5; /* XXX */
int rv;
int timo, rv;
parse_args(argc, argv);
ClientLogInit();
/*
* Set a timeout for talking to the master server.
* Use the idletimout if explicitly set (>0),
* otherwise use the overall timeout if explicitly set (>0),
* otherwise the overall timeout is based on image size and
* we may not know that, so just pick a big number!
*
* XXX The current master server is single-threaded and waits for a
* couple of seconds after spawning a worker process to see if it
* dies immediately. So what might seem like a reasonable delay of 5
* seconds really isn't if there are even three requests in the
* master server queue ahead of us!
*/
if (idletimeout > 0)
timo = idletimeout;
else if (timeout > 0)
timo = timeout;
else
timo = 60; /* XXX */
/* Special case: streaming from stdin */
if (strcmp(uploadpath, "-") == 0) {
filesize = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment