Skip to content

Commit 656666d

Browse files
Merge pull request #81 from mattfelsen/master
Client reconnect defaults to off
2 parents f3a3e53 + b9e260d commit 656666d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

libs/ofxLibwebsockets/src/Client.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@
1010

1111
namespace ofxLibwebsockets {
1212

13-
ClientOptions defaultClientOptions(){
13+
ClientOptions defaultClientOptions(){
1414
ClientOptions opts;
1515
opts.host = "localhost";
1616
opts.port = 80;
1717
opts.bUseSSL = false;
1818
opts.channel = "/";
1919
opts.protocol = "NULL";
2020
opts.version = -1; //use latest version
21-
opts.reconnect = true;
21+
22+
// Note, turning this on has been seen to cause an EXC_BAD_ACCESS error
23+
// when calling libwebsocket_service() in threadedFunction(). If you're
24+
// having issues, try raising the reconnect interval, or not using this
25+
// reconnect option. Use at your own risk!
26+
opts.reconnect = false;
2227
opts.reconnectInterval = 1000;
2328

2429
opts.ka_time = 0;

0 commit comments

Comments
 (0)