diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-02-17 22:35:48 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-02-17 22:35:48 -0800 |
| commit | 29c6d4e0a2f7d0627fbfaa6589b5c4e40689ca57 (patch) | |
| tree | 793516b1e03d52e2cd4c4c6ed40eee4bd7a28c3b /tests/ws.c | |
| parent | 32e6f3978e18224bf5d6d7a3847ea25140ec6122 (diff) | |
| download | nng-29c6d4e0a2f7d0627fbfaa6589b5c4e40689ca57.tar.gz nng-29c6d4e0a2f7d0627fbfaa6589b5c4e40689ca57.tar.bz2 nng-29c6d4e0a2f7d0627fbfaa6589b5c4e40689ca57.zip | |
fixes #821 http_server crash when using url without hostname
Diffstat (limited to 'tests/ws.c')
| -rw-r--r-- | tests/ws.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -140,5 +140,20 @@ TestMain("WebSocket Transport", { So(nng_dial(s2, addr, NULL, 0) == NNG_ECONNREFUSED); }); + // This test covers bug 821. + Convey("Double wildcard listen works", { + nng_socket s1; + nng_socket s2; + So(nng_pair_open(&s1) == 0); + So(nng_pair_open(&s2) == 0); + Reset({ + nng_close(s1); + nng_close(s2); + }); + So(nng_listen(s1, "ws://*:5599/one", NULL, 0) == 0); + So(nng_listen(s1, "ws://*:5599/two", NULL, 0) == 0); + So(nng_dial(s2, "ws://127.0.0.1:5599/one", NULL, 0) == 0); + }); + nng_fini(); }) |
