diff options
| author | Jokler <jokler.contact@gmail.com> | 2017-10-17 01:04:41 +0200 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2017-10-17 01:10:59 +0200 |
| commit | 292805ff70b6b39adfaeb0ffafed8626169b7bee (patch) | |
| tree | 2d93d040e302be263fbc5a253d0151f4c9587f68 /src/lib.rs | |
| parent | 513aa57334536dabc7a22856bbb99bc92ff1038f (diff) | |
| download | frippy-292805ff70b6b39adfaeb0ffafed8626169b7bee.tar.gz frippy-292805ff70b6b39adfaeb0ffafed8626169b7bee.zip | |
Display possible error when trying to create a connection
This can still panic but that should be fixed
in the next version of the irc library.
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -94,7 +94,13 @@ pub fn run() { // Open a connection and add work for each config for config in configs { - let fut = IrcServer::new_future(reactor.handle(), &config).unwrap(); + let fut = match IrcServer::new_future(reactor.handle(), &config) { + Ok(v) => v, + Err(e) => { + error!("Failed to connect: {}", e); + return; + } + }; let server = match reactor.run(fut) { Ok(v) => { |
