tjbush / mochiweb

Automatically exported from code.google.com/p/mochiweb
Other
0 stars 0 forks source link

Support unnamed http servers #69

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

code:
-module(test).
-compile(export_all).
start(Port) ->
    mochiweb_http:start([{port, Port},
                         {loop, fun(_Req) -> ok end}]).

run:
test:start(8000).
test:start(8001).

The first call registers the process as mochiweb_http. Then no further http
servers can be started without names.

Attached patch rectifies this by treating servers with name == undefined
differently -- they will not be registered. So it will support below code:
-compile(export_all).
start(Port) ->
    mochiweb_http:start([{port, Port},
                         {name, undefined},
                         {loop, fun(_Req) -> ok end}]).

See attached patch.

Original issue reported on code.google.com by mark.f...@gmail.com on 8 Apr 2010 at 11:54

Attachments:

GoogleCodeExporter commented 8 years ago
r155

Original comment by bob.ippo...@gmail.com on 12 Apr 2010 at 4:33