Skip to content

Commit b5975d5

Browse files
authored
Merge branch 'finos:master' into master
2 parents 25077fc + 3386775 commit b5975d5

File tree

16 files changed

+3432
-6821
lines changed

16 files changed

+3432
-6821
lines changed

bridge/Bridge.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ Bridge::~Bridge()
9090

9191
_timers->stop();
9292

93+
if (_probeServer)
94+
{
95+
_probeServer->stop();
96+
_probeServer = nullptr;
97+
}
98+
9399
if (_backgroundJobQueue)
94100
{
95101
_backgroundJobQueue->stop();
@@ -103,11 +109,6 @@ Bridge::~Bridge()
103109

104110
_timers.reset();
105111

106-
if (_probeServer)
107-
{
108-
_probeServer->stop();
109-
}
110-
111112
uint32_t n = 0;
112113
for (auto& workerThread : _workerThreads)
113114
{
@@ -209,7 +210,7 @@ void Bridge::initialize(std::shared_ptr<transport::EndpointFactory> endpointFact
209210
return;
210211
}
211212

212-
_probeServer = std::make_unique<transport::ProbeServer>(_iceConfig, _config);
213+
_probeServer = std::make_unique<transport::ProbeServer>(_iceConfig, _config, *_rtJobManager);
213214

214215
const auto credentials = _probeServer->getCredentials();
215216

examples/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ responsible for allocating and configuring SMB resources. Simpleclient acts as t
66
These projects are limited in their use cases and are only meant for documentation and testing purposes.
77

88
## Building
9+
Make sure SMb has been built with legacy_api off
910

1011
### Simpleserver
1112

@@ -25,7 +26,7 @@ Simpleserver is a java project requiring maven and openjdk 11 or later.
2526

2627
1. Start SMB.
2728
2. Start simpleserver.
28-
3. Open two or more tabs in Chrome with simpleclient/dist/index.html
29+
3. Open two or more tabs in Chrome with localhost:3000
2930
4. Make sure the simpleserver instance at https://localhost:8081/ is accessible from Chrome. You might have to add an exception for the self-signed certificate of simpleserver.
3031
5. Click 'join' in the simpleclient instances.
3132

examples/simpleclient/gulpfile.js

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
1-
var gulp = require("gulp");
1+
var gulp = require("gulp"), connect = require('gulp-connect');
22
var browserify = require("browserify");
3-
var source = require("vinyl-source-stream");
3+
var source = require("vinyl-source-stream"), buffer = require('vinyl-buffer');
44
var watchify = require("watchify");
55
var tsify = require("tsify");
66
var fancy_log = require("fancy-log");
7-
var paths = {
8-
pages: ["src/*.html"],
9-
};
10-
var watchedBrowserify = watchify(
11-
browserify({
12-
basedir: ".",
13-
debug: true,
14-
entries: ["src/main.ts", "src/simulcast.ts"],
15-
cache: {},
16-
packageCache: {},
17-
}).plugin(tsify)
18-
);
19-
gulp.task("copy-html", function () {
20-
return gulp.src(paths.pages).pipe(gulp.dest("dist"));
21-
});
22-
function bundle() {
23-
return watchedBrowserify
24-
.bundle()
25-
.on("error", fancy_log)
26-
.pipe(source("bundle.js"))
27-
.pipe(gulp.dest("dist"));
7+
var sourcemaps = require('gulp-sourcemaps');
8+
9+
var customOpts = {entries : [ "src/*.html", "src/*.ts" ], debug : true};
10+
11+
var b = watchify(browserify({
12+
basedir : ".",
13+
debug : true,
14+
entries : [ "src/main.ts", "src/simulcast.ts" ],
15+
cache : {},
16+
packageCache : {},
17+
}).plugin(tsify));
18+
19+
gulp.task('js', bundle); // so you can run `gulp js` to build the file
20+
b.on('update', bundle); // on any dep update, runs the bundler
21+
b.on('log', fancy_log.info); // output build logs to terminal
22+
23+
gulp.task("copy-html", function() { return gulp.src(customOpts.entries).pipe(gulp.dest("dist")); });
24+
gulp.task('connect', function() { connect.server({root : 'dist', livereload : true, port : 3000}); });
25+
26+
gulp.task('default', gulp.series('js', 'copy-html', 'connect'));
27+
28+
function bundle()
29+
{
30+
return b
31+
.bundle()
32+
// log errors if they happen
33+
.on('error', fancy_log.error.bind(fancy_log, 'Browserify Error'))
34+
.pipe(source('bundle.js'))
35+
// optional, remove if you don't need to buffer file contents
36+
.pipe(buffer())
37+
// optional, remove if you dont want sourcemaps
38+
.pipe(sourcemaps.init({loadMaps : true})) // loads map from browserify file
39+
// Add transformation tasks to the pipeline here.
40+
.pipe(sourcemaps.write('./')) // writes .map file
41+
.pipe(gulp.dest('./dist'));
2842
}
29-
gulp.task("default", gulp.series(gulp.parallel("copy-html"), bundle));
30-
watchedBrowserify.on("update", bundle);
31-
watchedBrowserify.on("log", fancy_log);

0 commit comments

Comments
 (0)