Skip to content

Commit

Permalink
mosquitto: fix bug with firefox wss http/2
Browse files Browse the repository at this point in the history
Firefox has a bug preventing websockets being created with
a server that uses http/2. Building libwebsockets without
http/2 support fixes this issue for mosquitto.
See eclipse-mosquitto/mosquitto#1211 (comment)
  • Loading branch information
rskew committed Jul 21, 2023
1 parent 26597fe commit 6d1fff9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkgs/servers/mqtt/mosquitto/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@

let
# Mosquitto needs external poll enabled in libwebsockets.
libwebsockets' = libwebsockets.override {
libwebsockets' = (libwebsockets.override {
withExternalPoll = true;
};
}).overrideAttrs (old: {
# Avoid bug in firefox preventing websockets being created over http/2 connections
# https://github.com/eclipse/mosquitto/issues/1211#issuecomment-958137569
cmakeFlags = old.cmakeFlags ++ [ "-DLWS_WITH_HTTP2=OFF" ];
});

in
stdenv.mkDerivation rec {
pname = "mosquitto";
Expand Down

0 comments on commit 6d1fff9

Please sign in to comment.