Project

General

Profile

Actions

Bug #1300

closed

wthttpd server opens random port when the configured port is not available

Added by Pieter Libin over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
05/22/2012
Due date:
% Done:

0%

Estimated time:

Description

wthttpd server opens random port when the configured port is not available.

For example, when wthttpd is configured to run on port 8080.

When we run one instance of wthttpd on port 8080, and afterwards we try to start another instance, we expect the start of the second would fail, but it succeeds and will listen on a random http port.

Actions #1

Updated by Jake Petroules over 12 years ago

Isn't this the intended behaviour?

Actions #2

Updated by Jake Petroules over 12 years ago

Fixed in f2d46bfe08376f3d11806cf863243ccea6d7f3aa it seems.

Actions #3

Updated by Koen Deforche over 12 years ago

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche
  • Target version set to 3.2.2

Has been fixed in git indeed.

Actions #4

Updated by Jan Hrubeš over 12 years ago

Hi,

what was the patch exactly.

I have tried to patch http/Server.C from 3.2.1 to f2d46bfe08376f3d11806cf863243ccea6d7f3aa (there are several "throw" added), but it has no influence.

Btw, why disappears git pushes from http://redmine.emweb.be/projects/wt/activity.

regards,

Jan

Actions #5

Updated by Koen Deforche over 12 years ago

Hey,

The patch is in attachment.

The reason for disabling git support in redmine is because it was the cause for extreme slow downs (and frequent timeouts) of redmine. I believe you can get the same information (and more) from github now ?

Regards,

koen

diff ---git a/src/http/Server.C b/src/http/Server.C

index 50aa289..226df2b 100644

---- a/src/http/Server.C

  • b/src/http/Server.C
    @@ --121,6 +121,7 @@ void Server::start()
    tcp_acceptor_.bind(tcp_endpoint);
    } catch (boost::system::system_error e) {
    LOG_ERROR_S(&wt_, bindError(tcp_endpoint, e));
  • throw;
    }
    tcp_acceptor_.listen();

@@ --162,6 +163,7 @@ void Server::start()

ssl_acceptor_.bind(ssl_endpoint);

} catch (boost::system::system_error e) {

LOG_ERROR_S(&wt_, bindError(ssl_endpoint, e);)

  • throw;
    }
    ssl_acceptor_.listen();
Actions #6

Updated by Koen Deforche over 12 years ago

  • Status changed from Resolved to Closed

Released in Wt 3.2.2

Actions

Also available in: Atom PDF