After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702911 - Creating a soup server on an already bound port in gjs silently returns the wrong object
Creating a soup server on an already bound port in gjs silently returns the w...
Status: RESOLVED DUPLICATE of bug 561547
Product: libsoup
Classification: Core
Component: API
2.42.x
Other Linux
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2013-06-23 18:21 UTC by Jamie Brandon
Modified: 2013-06-28 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jamie Brandon 2013-06-23 18:21:31 UTC
>>> Soup = gi.imports.Soup
>>> s1 = new Soup.Server({"port": 10011})
[object instance proxy GIName:Soup.Server jsobj@0x7f2869850fa0 native@0x461ff10]
>>> s2 = new Soup.Server({"port": 10011})
[object prototype of GIName:Soup.Server jsobj@0x7f2869bc7910]
        ^^^^^^^^^

I would expect it to throw an exception.
Comment 1 Dan Winship 2013-06-28 12:37:55 UTC
yeah, SoupServer is a broken old API that sometimes returns NULL from its constructor(), which you're not supposed to do, and apparently gjs doesn't deal with this. Will be fixed eventually...

*** This bug has been marked as a duplicate of bug 561547 ***